From 5781e0ca2188f39d388aabada7d80a1a315a0752 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 19 Apr 2020 18:10:16 -0700 Subject: Rename some Haskell nix files --- nix/build.nix | 4 ++-- nix/deps.nix | 53 ------------------------------------------------ nix/haskell-deps.nix | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ nix/haskell-overlay.nix | 50 +++++++++++++++++++++++++++++++++++++++++++++ nix/haskell-packages.nix | 50 --------------------------------------------- nix/nixpkgs.nix | 2 +- 6 files changed, 106 insertions(+), 106 deletions(-) delete mode 100644 nix/deps.nix create mode 100644 nix/haskell-deps.nix create mode 100644 nix/haskell-overlay.nix delete mode 100644 nix/haskell-packages.nix (limited to 'nix') diff --git a/nix/build.nix b/nix/build.nix index 6f979d7..dd16df6 100644 --- a/nix/build.nix +++ b/nix/build.nix @@ -17,7 +17,7 @@ let subset = a: b: builtins.all (x: builtins.elem x b) a; - allDeps = import ./deps.nix; + allDeps = import ./haskell-deps.nix; # gather data needed for compiling by analyzing the main module analyze = main: rec { @@ -42,7 +42,7 @@ let if (subset deps allDeps) then depsToPackageSet hp deps else throw '' - missing from deps.nix: + missing from nix/haskell-deps.nix: ${toString (lib.lists.subtractLists allDeps deps)} '')); diff --git a/nix/deps.nix b/nix/deps.nix deleted file mode 100644 index 44c2050..0000000 --- a/nix/deps.nix +++ /dev/null @@ -1,53 +0,0 @@ -[ - "MonadRandom" - "QuickCheck" - "acid-state" - "aeson" - "async" - "bytestring" - "capability" - "clay" - "config-ini" - "containers" - "dhall" - "directory" - "ekg" - "envy" - "fast-logger" - "filepath" - "ghcjs-base" - "http-types" - "ixset" - "katip" - "lucid" - "miso" - "monad-logger" - "monad-metrics" - "mtl" - "network-uri" - "process" - "protolude" - "quickcheck-instances" - "random" - "req" - "safecopy" - "scotty" - "servant" - "servant-lucid" - "servant-server" - "split" - "stm" - "string-quote" - "tasty" - "text" - "transformers" - "unagi-chan" - "unix" - "unordered-containers" - "vector" - "wai" - "wai-app-static" - "wai-extra" - "wai-middleware-metrics" - "warp" -] diff --git a/nix/haskell-deps.nix b/nix/haskell-deps.nix new file mode 100644 index 0000000..44c2050 --- /dev/null +++ b/nix/haskell-deps.nix @@ -0,0 +1,53 @@ +[ + "MonadRandom" + "QuickCheck" + "acid-state" + "aeson" + "async" + "bytestring" + "capability" + "clay" + "config-ini" + "containers" + "dhall" + "directory" + "ekg" + "envy" + "fast-logger" + "filepath" + "ghcjs-base" + "http-types" + "ixset" + "katip" + "lucid" + "miso" + "monad-logger" + "monad-metrics" + "mtl" + "network-uri" + "process" + "protolude" + "quickcheck-instances" + "random" + "req" + "safecopy" + "scotty" + "servant" + "servant-lucid" + "servant-server" + "split" + "stm" + "string-quote" + "tasty" + "text" + "transformers" + "unagi-chan" + "unix" + "unordered-containers" + "vector" + "wai" + "wai-app-static" + "wai-extra" + "wai-middleware-metrics" + "warp" +] diff --git a/nix/haskell-overlay.nix b/nix/haskell-overlay.nix new file mode 100644 index 0000000..b496cd4 --- /dev/null +++ b/nix/haskell-overlay.nix @@ -0,0 +1,50 @@ +self: super: + +let + claySrc = super.pkgs.fetchFromGitHub { + owner = "sebastiaanvisser"; + repo = "clay"; + rev = "cc7729b1b42a79e261091ff7835f7fc2a7ae3cee"; + sha256 = "1vd67976lvi5l4qq18zy6j44apynkl44ps04p8vwfx4gzr895dyp"; + }; + jsaddleSrc = super.pkgs.fetchFromGitHub { + owner = "ghcjs"; + repo = "jsaddle"; + rev = "1e39844"; + sha256 = "1qrjrjagmrrlcalys33636w5cb67db52i183masb7xd93wir8963"; + }; + misoSrc = super.pkgs.fetchFromGitHub { + owner = "dmjio"; + repo = "miso"; + rev = "1.5"; + sha256 = "00al7gw760vzzlqpf035k4n4li0rdymcjpxn184z9nc4m92cjv9z"; + }; +in { + haskell = super.haskell // { + packages = super.haskell.packages // { + ghc865 = super.haskell.packages.ghc865.override (old: { + overrides = with super.pkgs.haskell.lib; self: super: { + clay = self.callCabal2nix "clay" claySrc {}; + miso = self.callCabal2nix "miso" misoSrc {}; + wai-middleware-metrics = dontCheck super.wai-middleware-metrics; + }; + }); + ghcjs = super.haskell.packages.ghcjs.override (old: { + overrides = with super.haskell.lib; self: super: { + QuickCheck = dontCheck super.QuickCheck; + base-compat-batteries = dontCheck super.http-types; + clay = dontCheck (self.callCabal2nix "clay" claySrc {}); + comonad = dontCheck super.comonad; + jsaddle-warp = dontCheck (self.callCabal2nix "jsaddle-warp" "${jsaddleSrc}/jsaddle-warp" {}); + http-types = dontCheck super.http-types; + miso = self.callCabal2nix "miso" misoSrc {}; + network-uri= dontCheck super.network-uri; + scientific = dontCheck super.scientific; # takes forever + servant = dontCheck super.servant; + tasty-quickcheck = dontCheck super.tasty-quickcheck; + time-compat = dontCheck super.time-compat; + }; + }); + }; + }; +} diff --git a/nix/haskell-packages.nix b/nix/haskell-packages.nix deleted file mode 100644 index b496cd4..0000000 --- a/nix/haskell-packages.nix +++ /dev/null @@ -1,50 +0,0 @@ -self: super: - -let - claySrc = super.pkgs.fetchFromGitHub { - owner = "sebastiaanvisser"; - repo = "clay"; - rev = "cc7729b1b42a79e261091ff7835f7fc2a7ae3cee"; - sha256 = "1vd67976lvi5l4qq18zy6j44apynkl44ps04p8vwfx4gzr895dyp"; - }; - jsaddleSrc = super.pkgs.fetchFromGitHub { - owner = "ghcjs"; - repo = "jsaddle"; - rev = "1e39844"; - sha256 = "1qrjrjagmrrlcalys33636w5cb67db52i183masb7xd93wir8963"; - }; - misoSrc = super.pkgs.fetchFromGitHub { - owner = "dmjio"; - repo = "miso"; - rev = "1.5"; - sha256 = "00al7gw760vzzlqpf035k4n4li0rdymcjpxn184z9nc4m92cjv9z"; - }; -in { - haskell = super.haskell // { - packages = super.haskell.packages // { - ghc865 = super.haskell.packages.ghc865.override (old: { - overrides = with super.pkgs.haskell.lib; self: super: { - clay = self.callCabal2nix "clay" claySrc {}; - miso = self.callCabal2nix "miso" misoSrc {}; - wai-middleware-metrics = dontCheck super.wai-middleware-metrics; - }; - }); - ghcjs = super.haskell.packages.ghcjs.override (old: { - overrides = with super.haskell.lib; self: super: { - QuickCheck = dontCheck super.QuickCheck; - base-compat-batteries = dontCheck super.http-types; - clay = dontCheck (self.callCabal2nix "clay" claySrc {}); - comonad = dontCheck super.comonad; - jsaddle-warp = dontCheck (self.callCabal2nix "jsaddle-warp" "${jsaddleSrc}/jsaddle-warp" {}); - http-types = dontCheck super.http-types; - miso = self.callCabal2nix "miso" misoSrc {}; - network-uri= dontCheck super.network-uri; - scientific = dontCheck super.scientific; # takes forever - servant = dontCheck super.servant; - tasty-quickcheck = dontCheck super.tasty-quickcheck; - time-compat = dontCheck super.time-compat; - }; - }); - }; - }; -} diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix index 74039e0..864511b 100644 --- a/nix/nixpkgs.nix +++ b/nix/nixpkgs.nix @@ -5,7 +5,7 @@ let overlays = [ (_: _: { inherit sources; }) (_: _: { niv = import sources.niv {}; }) - (import ./haskell-packages.nix) + (import ./haskell-overlay.nix) (_: pkgs: { wemux = pkgs.callPackage ./wemux.nix {}; }) ]; }; -- cgit v1.2.3