From 4945d01ee66657ba5be55701a4dcc667aa07e166 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 21 Apr 2024 16:51:58 +0200 Subject: [PATCH 1/2] FromCabal.Flags: update git-annex flags - Remove all flags that no longer exist - Force new crypton flag on (which it seems to default to in practice anyways) I've pondered whether to remove this altogether, but let's not get ahead of ourselves yet. --- .../Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs index 1836a8869..a622b14dc 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Flags.hs @@ -24,18 +24,17 @@ configureCabalFlags' (PackageIdentifier name version) | name == "diagrams-builder" = [enable "cairo", enable "svg", enable "ps", enable "rasterific"] | name == "fltkhs" = [enable "opengl"] | name == "folds" = [disable "test-hlint"] - | name == "git-annex" = [ enable "assistant" + | name == "git-annex" = [ -- default + enable "assistant" + , disable "debuglocks" + -- custom , disable "benchmark" + , enable "crypton" , enable "dbus" - , disable "debuglocks" , enable "magicmime" - , enable "networkbsd" , enable "pairing" , enable "production" - , enable "s3" , enable "torrentparser" - , enable "webapp" - , enable "webdav" ] | name == "haskeline" = [enable "terminfo"] | name == "haste-compiler" = [enable "portable"] From 6260a55aa1e7606ed4f63e9e77d8f925beb984ef Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 21 Apr 2024 16:53:22 +0200 Subject: [PATCH 2/2] FromCabal.PostProcess: remove gitAnnexHook These can more easily be maintained in configuration-nix.nix in nixpkgs. The git-annex build system is not quite for eternity and has changed in the last year, requiring extra fiddling around to install man pages, for example. --- .../Nixpkgs/Haskell/FromCabal/PostProcess.hs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs index 665577654..1b717d26b 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs @@ -110,7 +110,6 @@ hooks = , ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True) , ("git", set doCheck False) -- https://github.com/vincenthz/hit/issues/33 , ("git-annex >= 6.20170925 && < 6.20171214", set doCheck False) -- some versions of git-annex require their test suite to be run inside of a git checkout - , ("git-annex", gitAnnexHook) , ("github-backup", set (executableDepends . tool . contains (pkg "git")) True) , ("GLFW", over (libraryDepends . system) (Set.union (Set.fromList [bind "pkgs.xorg.libXext", bind "pkgs.xorg.libXfixes"]))) , ("GlomeVec", set (libraryDepends . pkgconfig . contains (bind "self.llvmPackages.llvm")) True) @@ -224,22 +223,6 @@ haddockHook = set doCheck False . over (dependencies . haskell) (Set.filter (\b -> view localName b /= "haddock-test")) . set (metaSection . broken) False -gitAnnexHook :: Derivation -> Derivation -gitAnnexHook = set phaseOverrides gitAnnexOverrides - . over (executableDepends . system) (Set.union buildInputs) - where - gitAnnexOverrides = unlines - [ "preConfigure = \"export HOME=$TEMPDIR; patchShebangs .\";" - , "postBuild = ''" - , " ln -sf dist/build/git-annex/git-annex git-annex" - , " ln -sf git-annex git-annex-shell" - , "'';" - , "installPhase = \"make PREFIX=$out BUILDER=: install install-completions\";" - , "checkPhase = ''PATH+=\":$PWD\" git-annex test'';" - , "enableSharedExecutables = false;" - ] - buildInputs = pkgs ["git","rsync","gnupg","curl","wget","lsof","openssh","which","bup","perl"] - hfusePreConfigure :: String hfusePreConfigure = unlines [ "preConfigure = ''"