summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-10-17 15:59:58 +0200
committerlassulus <lass@aidsballs.de>2015-10-17 15:59:58 +0200
commit21b6854a15a827850b50040f52c853ca8ba56024 (patch)
tree2a45e2393be9980d0c485dc6cf726d1601454a04 /krebs
parent62af75a108efa64683532f949110bf412ffecfd9 (diff)
parent8cfdca6b6d6eed24953c1259b11239260e5a849f (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'krebs')
-rw-r--r--krebs/4lib/maybe.nix10
-rw-r--r--krebs/5pkgs/default.nix20
-rw-r--r--krebs/5pkgs/haskell-overrides/blessings.nix14
-rw-r--r--krebs/5pkgs/haskell-overrides/email-header.nix25
-rw-r--r--krebs/5pkgs/haskell-overrides/megaparsec.nix20
-rw-r--r--krebs/5pkgs/haskell-overrides/scanner.nix12
-rw-r--r--krebs/5pkgs/much/default.nix58
7 files changed, 110 insertions, 49 deletions
diff --git a/krebs/4lib/maybe.nix b/krebs/4lib/maybe.nix
new file mode 100644
index 000000000..5189c99a1
--- /dev/null
+++ b/krebs/4lib/maybe.nix
@@ -0,0 +1,10 @@
+{ ... }:
+
+rec {
+ Just = x: { type = "maybe"; value = x; };
+ Nothing = { type = "maybe"; };
+ isMaybe = x: builtins.typeOf x == "set" && x.type or false == "maybe";
+ isJust = x: isMaybe x && builtins.hasAttr "value" x;
+ fromJust = x: assert isJust x; x.value;
+ catMaybes = xs: map fromJust (builtins.filter isJust xs);
+}
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index a8a1b5853..84fb8725b 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -1,6 +1,6 @@
-{ lib, pkgs, ... }:
+{ pkgs, ... }:
-with import ../4lib { inherit lib; };
+with import ../4lib { inherit (pkgs) lib; };
let
subdirs = mapAttrs (_: flip pkgs.callPackage {}) (subdirsOf ./.);
@@ -9,6 +9,20 @@ in
subdirs // rec {
+ haskellPackages = pkgs.haskellPackages.override {
+ overrides = self: super:
+ mapAttrs (name: path: self.callPackage path {})
+ (mapAttrs'
+ (name: type:
+ if hasSuffix ".nix" name
+ then {
+ name = removeSuffix ".nix" name;
+ value = ./haskell-overrides + "/${name}";
+ }
+ else null)
+ (builtins.readDir ./haskell-overrides));
+ };
+
push = pkgs'.callPackage ./push {
inherit (subdirs) get jq;
};
@@ -30,7 +44,7 @@ subdirs // rec {
execveBin = name: cfg: execve name (cfg // { destination = "/bin/${name}"; });
writeC = name: { destination ? "" }: src: pkgs.runCommand name {} ''
- PATH=${lib.makeSearchPath "bin" (with pkgs; [
+ PATH=${makeSearchPath "bin" (with pkgs; [
binutils
coreutils
gcc
diff --git a/krebs/5pkgs/haskell-overrides/blessings.nix b/krebs/5pkgs/haskell-overrides/blessings.nix
new file mode 100644
index 000000000..311458211
--- /dev/null
+++ b/krebs/5pkgs/haskell-overrides/blessings.nix
@@ -0,0 +1,14 @@
+{ mkDerivation, base, fetchgit, stdenv }:
+mkDerivation {
+ pname = "blessings";
+ version = "1.0.0";
+ src = fetchgit {
+ url = http://cgit.cd.retiolum/blessings;
+ rev = "25a510dcb38ea9158e9969d56eb66cb1b860ab5f";
+ sha256 = "b962153e80e51519b52220199d8350b54154833e4bc25a792ecc58898fef3fb2";
+ };
+ libraryHaskellDepends = [ base ];
+ doHaddock = false;
+ # WTFPL is the true license, which is unknown to cabal.
+ license = stdenv.lib.licenses.wtfpl;
+}
diff --git a/krebs/5pkgs/haskell-overrides/email-header.nix b/krebs/5pkgs/haskell-overrides/email-header.nix
new file mode 100644
index 000000000..8c62f2f70
--- /dev/null
+++ b/krebs/5pkgs/haskell-overrides/email-header.nix
@@ -0,0 +1,25 @@
+{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
+, case-insensitive, containers, exceptions, fetchgit, QuickCheck
+, stdenv, tasty, tasty-quickcheck, text, text-icu, time
+}:
+mkDerivation {
+ pname = "email-header";
+ version = "0.3.0";
+ src = fetchgit {
+ url = "https://github.com/4z3/email-header";
+ sha256 = "f33fba567a39b1f2448869b269c26c40d8007599c23ab83bde5b4dfd9fd76ebc";
+ rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8";
+ };
+ buildDepends = [
+ attoparsec base base64-bytestring bytestring case-insensitive
+ containers exceptions text text-icu time
+ ];
+ testDepends = [
+ base bytestring case-insensitive containers QuickCheck tasty
+ tasty-quickcheck text time
+ ];
+ jailbreak = true;
+ homepage = "http://github.com/knrafto/email-header";
+ description = "Parsing and rendering of email and MIME headers";
+ license = stdenv.lib.licenses.bsd3;
+}
diff --git a/krebs/5pkgs/haskell-overrides/megaparsec.nix b/krebs/5pkgs/haskell-overrides/megaparsec.nix
new file mode 100644
index 000000000..5ade6006e
--- /dev/null
+++ b/krebs/5pkgs/haskell-overrides/megaparsec.nix
@@ -0,0 +1,20 @@
+{ mkDerivation, base, bytestring, fetchzip, HUnit, mtl, QuickCheck
+, stdenv, test-framework, test-framework-hunit
+, test-framework-quickcheck2, text, transformers
+}:
+mkDerivation {
+ pname = "megaparsec";
+ version = "4.1.0";
+ src = fetchzip {
+ url = "https://hackage.haskell.org/package/megaparsec-4.1.0/megaparsec-4.1.0.tar.gz";
+ sha256 = "1a1ka53a3r91lwnlvzaa8nyk1dxvfd1ij1i5x5vp83q2r9z9dcmi";
+ };
+ libraryHaskellDepends = [ base bytestring mtl text transformers ];
+ testHaskellDepends = [
+ base HUnit mtl QuickCheck test-framework test-framework-hunit
+ test-framework-quickcheck2 transformers
+ ];
+ homepage = "https://github.com/mrkkrp/megaparsec";
+ description = "Monadic parser combinators";
+ license = stdenv.lib.licenses.bsd3;
+}
diff --git a/krebs/5pkgs/haskell-overrides/scanner.nix b/krebs/5pkgs/haskell-overrides/scanner.nix
new file mode 100644
index 000000000..ebc5cd620
--- /dev/null
+++ b/krebs/5pkgs/haskell-overrides/scanner.nix
@@ -0,0 +1,12 @@
+{ mkDerivation, base, fetchgit, stdenv }:
+mkDerivation {
+ pname = "scanner";
+ version = "1.0.0";
+ src = fetchgit {
+ url = http://cgit.cd.retiolum/scanner;
+ rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad";
+ sha256 = "7d123c227777932039d26fc832b8d32a90f04c0bd6b7e8bcff0a6f49a54e0054";
+ };
+ libraryHaskellDepends = [ base ];
+ license = stdenv.lib.licenses.wtfpl;
+}
diff --git a/krebs/5pkgs/much/default.nix b/krebs/5pkgs/much/default.nix
index 82586b422..ba5ab2327 100644
--- a/krebs/5pkgs/much/default.nix
+++ b/krebs/5pkgs/much/default.nix
@@ -1,63 +1,29 @@
{ pkgs, ... }:
-let
- hspkgs = pkgs.haskellngPackages.override {
- overrides = self: super: {
- email-header = self.callPackage (
-{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
-, case-insensitive, containers, exceptions, fetchgit, QuickCheck
-, stdenv, tasty, tasty-quickcheck, text, text-icu, time
-}:
-mkDerivation {
- pname = "email-header";
- version = "0.3.0";
- src = fetchgit {
- url = "https://github.com/4z3/email-header";
- sha256 = "f33fba567a39b1f2448869b269c26c40d8007599c23ab83bde5b4dfd9fd76ebc";
- rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8";
- };
- buildDepends = [
- attoparsec base base64-bytestring bytestring case-insensitive
- containers exceptions text text-icu time
- ];
- testDepends = [
- base bytestring case-insensitive containers QuickCheck tasty
- tasty-quickcheck text time
- ];
- jailbreak = true;
- homepage = "http://github.com/knrafto/email-header";
- description = "Parsing and rendering of email and MIME headers";
- license = stdenv.lib.licenses.bsd3;
-}
-) {};
- };
- };
-in
-
-hspkgs.callPackage (
+pkgs.haskellngPackages.callPackage (
{ mkDerivation, aeson, attoparsec, base, base64-bytestring
-, blaze-builder, bytestring, case-insensitive, containers, deepseq
+, blaze-builder, blessings, bytestring, case-insensitive, containers, deepseq
, directory, docopt, email-header, fetchgit, filepath
, friendly-time, hyphenation, linebreak, old-locale, process
-, random, rosezipper, safe, split, stdenv, terminal-size, text
+, random, rosezipper, safe, scanner, split, stdenv, terminal-size, text
, time, transformers, transformers-compat, unix, vector
}:
mkDerivation {
pname = "much";
- version = "0.0.0.0";
+ version = "1.0.0";
src = fetchgit {
- url = "http://cgit.nomic/much";
- sha256 = "f0bcc34456cb876d3439694d1e16db414a540e13f476fa3ff1ad70d1d3caccb2";
- rev = "bfd854e05207a073eaa983c49f27c37555ccfce5";
+ url = "http://cgit.cd.retiolum/much";
+ rev = "045dc986b4de225a927175f81c8ccfdab450202c";
+ sha256 = "cec175e3dc32ef93029ee5285f6c4042ce11d637945bc8cec02cb6699d06cc13";
};
isLibrary = false;
isExecutable = true;
buildDepends = [
- aeson attoparsec base base64-bytestring blaze-builder bytestring
- case-insensitive containers deepseq directory docopt email-header
- filepath friendly-time hyphenation linebreak old-locale process
- random rosezipper safe split terminal-size text time transformers
- transformers-compat unix vector
+ aeson attoparsec base base64-bytestring blaze-builder blessings bytestring
+ case-insensitive containers deepseq directory docopt email-header filepath
+ friendly-time hyphenation linebreak old-locale process random rosezipper
+ safe scanner split terminal-size text time transformers transformers-compat
+ unix vector
];
license = stdenv.lib.licenses.mit;
}