about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix')
-rw-r--r--nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix b/nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix
new file mode 100644
index 000000000000..00bd9061f01a
--- /dev/null
+++ b/nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix
@@ -0,0 +1,40 @@
+# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.
+{ mkDerivation, aeson, ansi-wl-pprint, base, bytestring, Cabal
+, containers, deepseq, directory, distribution-nixpkgs, fetchzip
+, filepath, hackage-db, hopenssl, hpack, language-nix, lens, lib
+, monad-par, monad-par-extras, mtl, optparse-applicative, pretty
+, process, split, tasty, tasty-golden, text, time, transformers
+, yaml
+}:
+mkDerivation {
+  pname = "cabal2nix";
+  version = "unstable-2021-05-28";
+  src = fetchzip {
+    url = "https://github.com/NixOS/cabal2nix/archive/5fb325e094af91328e02cc2ecfd211feaeb135a7.tar.gz";
+    sha256 = "1zbd336s99rgk24yjqlp012d0f66s5nf190sjmsl7mfhqx9j2y4l";
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson ansi-wl-pprint base bytestring Cabal containers deepseq
+    directory distribution-nixpkgs filepath hackage-db hopenssl hpack
+    language-nix lens optparse-applicative pretty process split text
+    time transformers yaml
+  ];
+  executableHaskellDepends = [
+    aeson base bytestring Cabal containers directory
+    distribution-nixpkgs filepath hopenssl language-nix lens monad-par
+    monad-par-extras mtl optparse-applicative pretty
+  ];
+  testHaskellDepends = [
+    base Cabal containers directory filepath language-nix lens pretty
+    process tasty tasty-golden
+  ];
+  preCheck = ''
+    export PATH="$PWD/dist/build/cabal2nix:$PATH"
+    export HOME="$TMPDIR/home"
+  '';
+  homepage = "https://github.com/nixos/cabal2nix#readme";
+  description = "Convert Cabal files into Nix build instructions";
+  license = lib.licenses.bsd3;
+}