about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPedroHLC <root@pedrohlc.com>2024-03-28 13:57:08 -0300
committerPedroHLC <root@pedrohlc.com>2024-03-28 13:57:08 -0300
commitd546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e (patch)
tree8108c101138f5a7f8af86d7dedd36960a38ca2bc
parent13b12a92814bf411906620ffcd1d26e5c30017cc (diff)
downloadnixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar.gz
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar.bz2
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar.lz
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar.xz
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.tar.zst
nixlib-d546502c7ccdedcb0c51dcdc9aa7ef8727d3d83e.zip
elmPackages: move adjusts from cabal2nix-generated files to overrides
-rw-r--r--pkgs/development/compilers/elm/packages/ghc8_10/default.nix25
-rw-r--r--pkgs/development/compilers/elm/packages/ghc8_10/elm-instrument/default.nix18
-rw-r--r--pkgs/development/compilers/elm/packages/ghc8_10/elmi-to-json/default.nix6
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/default.nix22
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/elm-format/avh4-lib.nix4
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-lib.nix3
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-markdown.nix3
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-test-lib.nix3
-rw-r--r--pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format.nix13
9 files changed, 51 insertions, 46 deletions
diff --git a/pkgs/development/compilers/elm/packages/ghc8_10/default.nix b/pkgs/development/compilers/elm/packages/ghc8_10/default.nix
index 3414dce836ee..f68e582b3d0b 100644
--- a/pkgs/development/compilers/elm/packages/ghc8_10/default.nix
+++ b/pkgs/development/compilers/elm/packages/ghc8_10/default.nix
@@ -6,6 +6,14 @@ self: pkgs.haskell.packages.ghc810.override {
       elmPkgs = rec {
         elmi-to-json = justStaticExecutables (overrideCabal
           (drv: {
+            version = "unstable-2021-07-19";
+            src = pkgs.fetchgit {
+              url = "https://github.com/stoeffel/elmi-to-json";
+              sha256 = "0vy678k15rzpsn0aly90fb01pxsbqkgf86pa86w0gd94lka8acwl";
+              rev = "6a42376ef4b6877e130971faf964578cc096e29b";
+              fetchSubmodules = true;
+            };
+
             prePatch = ''
               substituteInPlace package.yaml --replace "- -Werror" ""
               hpack
@@ -21,6 +29,23 @@ self: pkgs.haskell.packages.ghc810.override {
 
         elm-instrument = justStaticExecutables (overrideCabal
           (drv: {
+            version = "unstable-2020-03-16";
+            src = pkgs.fetchgit {
+              url = "https://github.com/zwilias/elm-instrument";
+              sha256 = "167d7l2547zxdj7i60r6vazznd9ichwc0bqckh3vrh46glkz06jv";
+              rev = "63e15bb5ec5f812e248e61b6944189fa4a0aee4e";
+              fetchSubmodules = true;
+            };
+            patches = [
+              # Update code after breaking change in optparse-applicative
+              # https://github.com/zwilias/elm-instrument/pull/5
+              (pkgs.fetchpatch {
+                name = "update-optparse-applicative.patch";
+                url = "https://github.com/mdevlamynck/elm-instrument/commit/c548709d4818aeef315528e842eaf4c5b34b59b4.patch";
+                sha256 = "0ln7ik09n3r3hk7jmwwm46kz660mvxfa71120rkbbaib2falfhsc";
+              })
+            ];
+
             prePatch = ''
               sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
             '';
diff --git a/pkgs/development/compilers/elm/packages/ghc8_10/elm-instrument/default.nix b/pkgs/development/compilers/elm/packages/ghc8_10/elm-instrument/default.nix
index cb123d15efc6..7f6a25905e36 100644
--- a/pkgs/development/compilers/elm/packages/ghc8_10/elm-instrument/default.nix
+++ b/pkgs/development/compilers/elm/packages/ghc8_10/elm-instrument/default.nix
@@ -3,26 +3,16 @@
 , fetchgit, filepath, free, HUnit, indents, json, lib, mtl
 , optparse-applicative, parsec, process, QuickCheck, quickcheck-io
 , split, tasty, tasty-golden, tasty-hunit, tasty-quickcheck, text
-, fetchpatch
 }:
 mkDerivation {
   pname = "elm-instrument";
-  version = "unstable-2020-03-16";
+  version = "0.0.7";
   src = fetchgit {
     url = "https://github.com/zwilias/elm-instrument";
-    sha256 = "167d7l2547zxdj7i60r6vazznd9ichwc0bqckh3vrh46glkz06jv";
-    rev = "63e15bb5ec5f812e248e61b6944189fa4a0aee4e";
+    sha256 = "14yfzwsyvgc6rzn19sdmwk2mc1vma9hcljnmjnmlig8mp0271v56";
+    rev = "31b527e405a6afdb25bb87ad7bd14f979e65cff7";
     fetchSubmodules = true;
   };
-  patches = [
-    # Update code after breaking change in optparse-applicative
-    # https://github.com/zwilias/elm-instrument/pull/5
-    (fetchpatch {
-      name = "update-optparse-applicative.patch";
-      url = "https://github.com/mdevlamynck/elm-instrument/commit/c548709d4818aeef315528e842eaf4c5b34b59b4.patch";
-      sha256 = "0ln7ik09n3r3hk7jmwwm46kz660mvxfa71120rkbbaib2falfhsc";
-    })
-  ];
   isLibrary = true;
   isExecutable = true;
   setupHaskellDepends = [ base Cabal directory filepath process ];
@@ -37,7 +27,7 @@ mkDerivation {
     quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck
     text
   ];
-  homepage = "https://elm-lang.org";
+  homepage = "http://elm-lang.org";
   description = "Instrumentation library for Elm";
   license = lib.licenses.bsd3;
   mainProgram = "elm-instrument";
diff --git a/pkgs/development/compilers/elm/packages/ghc8_10/elmi-to-json/default.nix b/pkgs/development/compilers/elm/packages/ghc8_10/elmi-to-json/default.nix
index 3e61c21b9c3e..fc2c76149a1a 100644
--- a/pkgs/development/compilers/elm/packages/ghc8_10/elmi-to-json/default.nix
+++ b/pkgs/development/compilers/elm/packages/ghc8_10/elmi-to-json/default.nix
@@ -4,11 +4,11 @@
 }:
 mkDerivation {
   pname = "elmi-to-json";
-  version = "unstable-2021-07-19";
+  version = "1.3.0";
   src = fetchgit {
     url = "https://github.com/stoeffel/elmi-to-json";
-    hash = "sha256-9fScXRSyTkqzeXwh/Jjza6mnENCThlU6KI366CLFcgY=";
-    rev = "bd18efb59d247439b362272b480e67a16a4e424e";
+    sha256 = "0vy678k15rzpsn0aly90fb01pxsbqkgf86pa86w0gd94lka8acwl";
+    rev = "6a42376ef4b6877e130971faf964578cc096e29b";
     fetchSubmodules = true;
   };
   isLibrary = true;
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/default.nix b/pkgs/development/compilers/elm/packages/ghc9_2/default.nix
index de99dfd91dbc..5ef5eff3bef1 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/default.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/default.nix
@@ -11,6 +11,15 @@ self: pkgs.haskell.packages.ghc92.override {
         elm-format = justStaticExecutables (overrideCabal
           (drv: {
             jailbreak = true;
+            doHaddock = false;
+            postPatch = ''
+              mkdir -p ./generated
+              cat <<EOHS > ./generated/Build_elm_format.hs
+              module Build_elm_format where
+              gitDescribe :: String
+              gitDescribe = "${drv.version}"
+              EOHS
+            '';
 
             description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
             homepage = "https://github.com/avh4/elm-format";
@@ -19,15 +28,20 @@ self: pkgs.haskell.packages.ghc92.override {
           })
           (self.callPackage ./elm-format/elm-format.nix { }));
       };
+
+      fixHaddock = overrideCabal (_: {
+        configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
+        doHaddock = false;
+      });
     in
     elmPkgs // {
       inherit elmPkgs;
 
       # Needed for elm-format
-      avh4-lib = doJailbreak (self.callPackage ./elm-format/avh4-lib.nix { });
-      elm-format-lib = doJailbreak (self.callPackage ./elm-format/elm-format-lib.nix { });
-      elm-format-test-lib = self.callPackage ./elm-format/elm-format-test-lib.nix { };
-      elm-format-markdown = self.callPackage ./elm-format/elm-format-markdown.nix { };
+      avh4-lib = fixHaddock (doJailbreak (self.callPackage ./elm-format/avh4-lib.nix { }));
+      elm-format-lib =  fixHaddock (doJailbreak (self.callPackage ./elm-format/elm-format-lib.nix { }));
+      elm-format-test-lib = fixHaddock (self.callPackage ./elm-format/elm-format-test-lib.nix { });
+      elm-format-markdown = fixHaddock (self.callPackage ./elm-format/elm-format-markdown.nix { });
 
       # elm-format requires text >= 2.0
       text = self.text_2_0_2;
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/avh4-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/avh4-lib.nix
index 871394312c04..e320edfd1162 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/avh4-lib.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/avh4-lib.nix
@@ -23,8 +23,4 @@ mkDerivation {
   testToolDepends = [ tasty-discover ];
   description = "Common code for haskell projects";
   license = lib.licenses.bsd3;
-
-  # Added manually
-  configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
-  doHaddock = false;
 }
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-lib.nix
index 2f81da176ac0..290534bbea9a 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-lib.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-lib.nix
@@ -26,7 +26,4 @@ mkDerivation {
   testToolDepends = [ tasty-discover ];
   description = "Common code used by elm-format and elm-refactor";
   license = lib.licenses.bsd3;
-
-  # Added manually
-  doHaddock = false;
 }
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-markdown.nix b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-markdown.nix
index 43174cf01725..e57d2127822e 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-markdown.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-markdown.nix
@@ -12,7 +12,4 @@ mkDerivation {
   libraryHaskellDepends = [ base containers mtl text ];
   description = "Markdown parsing for Elm documentation comments";
   license = lib.licenses.bsd3;
-
-  # Added manually
-  doHaddock = false;
 }
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-test-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-test-lib.nix
index 9cd433ad8843..43090abbeae4 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-test-lib.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format-test-lib.nix
@@ -23,7 +23,4 @@ mkDerivation {
   testToolDepends = [ tasty-discover ];
   description = "Test helpers used by elm-format-tests and elm-refactor-tests";
   license = lib.licenses.bsd3;
-
-  # Added manually
-  doHaddock = false;
 }
diff --git a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format.nix b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format.nix
index e57024acd662..82ec995e1ecc 100644
--- a/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format.nix
+++ b/pkgs/development/compilers/elm/packages/ghc9_2/elm-format/elm-format.nix
@@ -3,7 +3,7 @@
 , optparse-applicative, QuickCheck, quickcheck-io, relude, tasty
 , tasty-hspec, tasty-hunit, tasty-quickcheck, text
 }:
-mkDerivation rec {
+mkDerivation {
   pname = "elm-format";
   version = "0.8.7";
   src = fetchgit {
@@ -28,15 +28,4 @@ mkDerivation rec {
   description = "A source code formatter for Elm";
   license = lib.licenses.bsd3;
   mainProgram = "elm-format";
-
-  # Added manually (and "rec" above)
-  doHaddock = false;
-  postPatch = ''
-    mkdir -p ./generated
-    cat <<EOHS > ./generated/Build_elm_format.hs
-    module Build_elm_format where
-    gitDescribe :: String
-    gitDescribe = "${version}"
-    EOHS
-  '';
 }