mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00
cabal2nix: update to version 20150824-66-gd281a60
This patch fixes https://github.com/NixOS/nixpkgs/issues/9599.
This commit is contained in:
parent
13532ee161
commit
ada81b80fd
@ -754,7 +754,11 @@ self: super: {
|
||||
zlib = dontCheck super.zlib;
|
||||
|
||||
# Override the obsolete version from Hackage with our more up-to-date copy.
|
||||
cabal2nix = self.callPackage ../tools/haskell/cabal2nix {};
|
||||
cabal2nix = self.callPackage ../tools/haskell/cabal2nix/cabal2nix.nix {};
|
||||
hackage2nix = self.callPackage ../tools/haskell/cabal2nix/hackage2nix.nix {};
|
||||
lens-construction-helper = self.callPackage ../tools/haskell/cabal2nix/lens-construction-helper.nix {};
|
||||
language-nix = self.callPackage ../tools/haskell/cabal2nix/language-nix.nix {};
|
||||
distribution-nixpkgs = self.callPackage ../tools/haskell/cabal2nix/distribution-nixpkgs.nix {};
|
||||
|
||||
# https://github.com/urs-of-the-backwoods/HGamer3D/issues/7
|
||||
HGamer3D-Bullet-Binding = dontDistribute super.HGamer3D-Bullet-Binding;
|
||||
|
37
pkgs/development/tools/haskell/cabal2nix/cabal2nix.nix
Normal file
37
pkgs/development/tools/haskell/cabal2nix/cabal2nix.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ mkDerivation, ansi-wl-pprint, base, Cabal, containers, distribution-nixpkgs
|
||||
, language-nix, lens, lens-construction-helper, optparse-applicative, pretty
|
||||
, pretty-show, stdenv, fetchFromGitHub, nix-prefetch-scripts, makeWrapper
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "cabal2nix";
|
||||
version = "20150824-66-gd281a60";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nixos";
|
||||
repo = "cabal2nix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffizg60ihkipcgqr5km4vxgnqv2pdw4716amqlxgf31wj59nyas";
|
||||
};
|
||||
postUnpack = "sourceRoot+=/${pname}";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
enableSharedExecutables = false;
|
||||
executableHaskellDepends = [
|
||||
ansi-wl-pprint base Cabal containers distribution-nixpkgs
|
||||
language-nix lens lens-construction-helper optparse-applicative
|
||||
pretty pretty-show
|
||||
];
|
||||
executableToolDepends = [ makeWrapper ];
|
||||
postInstall = ''
|
||||
exe=$out/libexec/${pname}-${version}/${pname}
|
||||
install -D $out/bin/${pname} $exe
|
||||
rm -rf $out/{bin,lib,share}
|
||||
makeWrapper $exe $out/bin/${pname} --prefix PATH ":" "${nix-prefetch-scripts}/bin"
|
||||
mkdir -p $out/share/bash-completion/completions
|
||||
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/${pname}
|
||||
'';
|
||||
homepage = "https://github.com/nixos/cabal2nix#readme";
|
||||
description = "Convert Cabal files into Nix build instructions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
{ mkDerivation, fetchgit, aeson, ansi-wl-pprint, base, bytestring, Cabal
|
||||
, containers, deepseq, deepseq-generics, directory, doctest, filepath
|
||||
, hackage-db, hspec, lens, monad-par, monad-par-extras, mtl
|
||||
, optparse-applicative, pretty, process, QuickCheck, regex-posix, SHA, split
|
||||
, stdenv, transformers, utf8-string, makeWrapper, gitMinimal, cartel, data-default
|
||||
, nix-prefetch-scripts
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "cabal2nix";
|
||||
version = "20150824";
|
||||
src = fetchgit {
|
||||
url = "http://github.com/NixOS/cabal2nix.git";
|
||||
rev = "560fb2b1d22f4c995a526529bb034bd183e85a31";
|
||||
sha256 = "1pyjy9kb8g18g6shlg7vnyaspa892zaq4hqvmqvdbxrlf24vg0wp";
|
||||
deepClone = true;
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson ansi-wl-pprint base bytestring Cabal containers
|
||||
deepseq-generics directory filepath hackage-db lens monad-par
|
||||
monad-par-extras mtl optparse-applicative pretty process
|
||||
regex-posix SHA split transformers utf8-string data-default
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson ansi-wl-pprint base bytestring Cabal containers
|
||||
deepseq-generics directory filepath hackage-db lens monad-par
|
||||
monad-par-extras mtl optparse-applicative pretty process
|
||||
regex-posix SHA split transformers utf8-string data-default
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson ansi-wl-pprint base bytestring Cabal containers deepseq
|
||||
deepseq-generics directory doctest filepath hackage-db hspec lens
|
||||
monad-par monad-par-extras mtl optparse-applicative pretty process
|
||||
QuickCheck regex-posix SHA split transformers utf8-string data-default
|
||||
];
|
||||
buildDepends = [ cartel ];
|
||||
buildTools = [ gitMinimal makeWrapper ];
|
||||
preConfigure = ''
|
||||
git reset --hard # Re-create the index that fetchgit destroyed in the name of predictable hashes.
|
||||
runhaskell $setupCompileFlags generate-cabal-file --release >cabal2nix.cabal
|
||||
'';
|
||||
postInstall = ''
|
||||
exe=$out/libexec/${pname}-${version}/cabal2nix
|
||||
install -D $out/bin/cabal2nix $exe
|
||||
rm -rf $out/{bin,lib,share}
|
||||
makeWrapper $exe $out/bin/cabal2nix --prefix PATH ":" "${nix-prefetch-scripts}/bin"
|
||||
mkdir -p $out/share/bash-completion/completions
|
||||
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/cabal2nix
|
||||
'';
|
||||
homepage = "http://github.com/NixOS/cabal2nix/";
|
||||
description = "Convert Cabal files into Nix build instructions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{ mkDerivation, aeson, base, bytestring, Cabal, containers, deepseq
|
||||
, deepseq-generics, directory, doctest, filepath, hackage-db, hspec
|
||||
, language-nix, lens, lens-construction-helper, pretty, process
|
||||
, SHA, split, stdenv, transformers, utf8-string, fetchFromGitHub
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "distribution-nixpkgs";
|
||||
version = "20150824-66-gd281a60";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nixos";
|
||||
repo = "cabal2nix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffizg60ihkipcgqr5km4vxgnqv2pdw4716amqlxgf31wj59nyas";
|
||||
};
|
||||
postUnpack = "sourceRoot+=/${pname}";
|
||||
libraryHaskellDepends = [
|
||||
aeson base bytestring Cabal containers deepseq deepseq-generics
|
||||
directory doctest filepath hackage-db hspec language-nix lens
|
||||
lens-construction-helper pretty process SHA split transformers
|
||||
utf8-string
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base bytestring Cabal containers deepseq deepseq-generics
|
||||
directory doctest filepath hackage-db hspec language-nix lens
|
||||
lens-construction-helper pretty process SHA split transformers
|
||||
utf8-string
|
||||
];
|
||||
homepage = "https://github.com/nixos/cabal2nix#readme";
|
||||
description = "Convert Cabal files into Nix build instructions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
32
pkgs/development/tools/haskell/cabal2nix/hackage2nix.nix
Normal file
32
pkgs/development/tools/haskell/cabal2nix/hackage2nix.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ mkDerivation, base, Cabal, containers, distribution-nixpkgs
|
||||
, filepath, language-nix, lens, monad-par, monad-par-extras, mtl
|
||||
, optparse-applicative, pretty, stdenv, fetchFromGitHub
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "hackage2nix";
|
||||
version = "20150824-66-gd281a60";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nixos";
|
||||
repo = "cabal2nix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffizg60ihkipcgqr5km4vxgnqv2pdw4716amqlxgf31wj59nyas";
|
||||
};
|
||||
postUnpack = "sourceRoot+=/${pname}";
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
enableSharedExecutables = false;
|
||||
executableHaskellDepends = [
|
||||
base Cabal containers distribution-nixpkgs filepath language-nix
|
||||
lens monad-par monad-par-extras mtl optparse-applicative pretty
|
||||
];
|
||||
postInstall = ''
|
||||
exe=$out/bin/${pname}
|
||||
mkdir -p $out/share/bash-completion/completions
|
||||
$exe --bash-completion-script $exe >$out/share/bash-completion/completions/${pname}
|
||||
'';
|
||||
homepage = "https://github.com/nixos/cabal2nix#readme";
|
||||
description = "Convert Cabal files into Nix build instructions";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
23
pkgs/development/tools/haskell/cabal2nix/language-nix.nix
Normal file
23
pkgs/development/tools/haskell/cabal2nix/language-nix.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ mkDerivation, base, data-default-class, deepseq-generics, lens
|
||||
, lens-construction-helper, pretty, regex-posix, stdenv, fetchFromGitHub
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "language-nix";
|
||||
version = "20150824-66-gd281a60";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nixos";
|
||||
repo = "cabal2nix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffizg60ihkipcgqr5km4vxgnqv2pdw4716amqlxgf31wj59nyas";
|
||||
};
|
||||
postUnpack = "sourceRoot+=/${pname}";
|
||||
libraryHaskellDepends = [
|
||||
base data-default-class deepseq-generics lens
|
||||
lens-construction-helper pretty regex-posix
|
||||
];
|
||||
homepage = "https://github.com/nixos/cabal2nix#readme";
|
||||
description = "Data types and useful functions to represent and manipulate the Nix language";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
{ mkDerivation, base, data-default-class, fetchFromGitHub, lens, stdenv }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "lens-construction-helper";
|
||||
version = "20150824-66-gd281a60";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nixos";
|
||||
repo = "cabal2nix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ffizg60ihkipcgqr5km4vxgnqv2pdw4716amqlxgf31wj59nyas";
|
||||
};
|
||||
postUnpack = "sourceRoot+=/${pname}";
|
||||
libraryHaskellDepends = [ base data-default-class lens ];
|
||||
homepage = "https://github.com/nixos/cabal2nix#readme";
|
||||
description = "Use data-default to create default instances of various types";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user