Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: convert xscrnsaver to xlibs.libXScrnSaver #496

Merged
merged 1 commit into from
May 28, 2021

Conversation

teto
Copy link
Member

@teto teto commented May 27, 2021

No description provided.

@teto
Copy link
Member Author

teto commented May 27, 2021

following up on NixOS/nixpkgs#124593

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "xlibs." prefix should be unnecessary.

@teto teto force-pushed the convert-xscrnsaver branch from 63a378f to ba417e3 Compare May 27, 2021 19:15
@teto
Copy link
Member Author

teto commented May 27, 2021

done. I couldn't find an easy way to test (this repo weirdly doesnt provide a shell.nix/flake.nix to check one's changes, the regenerate scripts fail because they ask for a nixpkgs). Hope that's good.

@sternenseemann
Copy link
Member

Shouldn't it be xorg.libXScrnSaver? top level libXScrnSaver is not a thing.

@teto
Copy link
Member Author

teto commented May 27, 2021

which is why I had used xlibs.libXScrnSaver (nix-build -A xlibs.libXScrnSaver works fine here). I've checked the box for maintainers to edit since you know better how cabal2nix does the mapping.

@sternenseemann
Copy link
Member

xlibs is a deprecated alias for xorg, so we should use the latter definitely.

@teto
Copy link
Member Author

teto commented May 27, 2021

I've just noticed that in the line below my change Xss references libXScrnSaver directly so maybe that 's why @peti made his comment ? looking at hackage-packages.nix it seems cabal2nix is smart enough to do inherit (pkgs.xorg) libXScrnSaver; so I think @peti may be right.

@sternenseemann
Copy link
Member

sternenseemann commented May 27, 2021 via email

@cdepillabout
Copy link
Member

cdepillabout commented May 28, 2021

@teto Thanks for taking the time to put this together.

I tried regenerating hackage-packages.nix with this change and it appears to working:

diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index ec260563848..ccdef5fd12b 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -110881,9 +110881,9 @@ self: {
 
   "greenclip" = callPackage
     ({ mkDerivation, base, binary, bytestring, directory, exceptions
-     , hashable, libXau, microlens, microlens-mtl, protolude, text
-     , tomland, unix, vector, wordexp, X11, xcb, xdmcp, xlibsWrapper
-     , xscrnsaver
+     , hashable, libXau, libXScrnSaver, microlens, microlens-mtl
+     , protolude, text, tomland, unix, vector, wordexp, X11, xcb, xdmcp
+     , xlibsWrapper
      }:
      mkDerivation {
        pname = "greenclip";
@@ -110896,14 +110896,14 @@ self: {
          microlens-mtl protolude text tomland unix vector wordexp X11
        ];
        executablePkgconfigDepends = [
-         libXau xcb xdmcp xlibsWrapper xscrnsaver
+         libXau libXScrnSaver xcb xdmcp xlibsWrapper
        ];
        description = "Simple clipboard manager to be integrated with rofi";
        license = lib.licenses.bsd3;
        hydraPlatforms = lib.platforms.none;
        broken = true;
-     }) {inherit (pkgs.xorg) libXau; xcb = null; xdmcp = null; 
-         inherit (pkgs) xlibsWrapper; xscrnsaver = null;};
+     }) {inherit (pkgs.xorg) libXScrnSaver; inherit (pkgs.xorg) libXau; 
+         xcb = null; xdmcp = null; inherit (pkgs) xlibsWrapper;};
 
   "greg-client" = callPackage
     ({ mkDerivation, base, binary, bytestring, clock, hostname, network

greenclip now successfully builds.

@cdepillabout cdepillabout merged commit 5fb325e into NixOS:master May 28, 2021
@teto teto deleted the convert-xscrnsaver branch May 28, 2021 15:29
@teto
Copy link
Member Author

teto commented May 28, 2021

thanks for the guidance !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants