From 05d85719fc4d3f1f01104fecf8ab7c1af5359588 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 12 Dec 2017 16:29:24 +0100 Subject: pkgs.apt-cacher-ng: rip --- krebs/5pkgs/simple/apt-cacher-ng/default.nix | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 krebs/5pkgs/simple/apt-cacher-ng/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/apt-cacher-ng/default.nix b/krebs/5pkgs/simple/apt-cacher-ng/default.nix deleted file mode 100644 index e3986713b..000000000 --- a/krebs/5pkgs/simple/apt-cacher-ng/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ stdenv, fetchurl, cmake, doxygen, zlib, openssl, bzip2, pkgconfig, libpthreadstubs }: - -stdenv.mkDerivation rec { - name = "apt-cacher-ng-${version}"; - version = "2"; - - src = fetchurl { - url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz"; - sha256 = "0bkc3012vinridl5ch46pwnxjalymx4wf6nxax64nm7bdkcj9azf"; - }; - - NIX_LDFLAGS = "-lpthread"; - buildInputs = [ doxygen cmake zlib openssl bzip2 pkgconfig libpthreadstubs ]; - - meta = { - description = "A caching proxy specialized for linux distribution files"; - homepage = http://www.unix-ag.uni-kl.de/~bloch/acng/; - license = stdenv.lib.licenses.gpl2; - maintainers = [ stdenv.lib.maintainers.makefu ]; - }; -} -- cgit v1.2.3 From 42cdfa733ca9e0432ba6096206ff34fb40b539db Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 12 Dec 2017 16:32:21 +0100 Subject: pkgs.passwdqc-utils: rip --- krebs/5pkgs/simple/passwdqc-utils/default.nix | 37 --------------------------- 1 file changed, 37 deletions(-) delete mode 100644 krebs/5pkgs/simple/passwdqc-utils/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/passwdqc-utils/default.nix b/krebs/5pkgs/simple/passwdqc-utils/default.nix deleted file mode 100644 index 53e7f5482..000000000 --- a/krebs/5pkgs/simple/passwdqc-utils/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, pam, - fetchurl, lib, - wordset-file ? null, # set your own wordset-file - ... }: - -stdenv.mkDerivation rec { - name = "passwdqc-utils-${version}"; - version = "1.3.0"; - buildInputs = [ pam ]; - - src = fetchurl { - url = "http://www.openwall.com/passwdqc/passwdqc-${version}.tar.gz"; - sha256 = "0l3zbrp4pvah0dz33m48aqlz9nx663cc1fqhnlwr0p853b10la93"; - }; - - buildTargets = "utils"; - installFlags= [ "BINDIR=$(out)/bin" - "CONFDIR=$(out)/etc" - "SHARED_LIBDIR=$(out)/lib" - "DEVEL_LIBDIR=$(out)/lib" - "SECUREDIR=$(out)/lib/security" - "INCLUDEDIR=$(out)/include" - "MANDIR=$(out)/man" ]; - - patchPhase = lib.optionalString (wordset-file != null) '' - cp -f ${wordset-file} wordset_4k.c - ''; - - installTargets = "install_lib install_utils"; - - meta = { - description = "passwdqc utils (pwqgen,pwqcheck) and library"; - license = stdenv.lib.licenses.bsd3; - maintainers = [ stdenv.lib.maintainers.makefu ]; - patforms = stdenv.lib.platforms.linux; # more installFlags must be set for Darwin,Solaris - }; -} -- cgit v1.2.3 From 4df164ff1a132146bd53f2183cbe8a0bfa7f92c6 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 12 Dec 2017 20:18:04 +0100 Subject: Revert "pkgs.passwdqc-utils: rip" This reverts commit 42cdfa733ca9e0432ba6096206ff34fb40b539db. --- krebs/5pkgs/simple/passwdqc-utils/default.nix | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 krebs/5pkgs/simple/passwdqc-utils/default.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/passwdqc-utils/default.nix b/krebs/5pkgs/simple/passwdqc-utils/default.nix new file mode 100644 index 000000000..53e7f5482 --- /dev/null +++ b/krebs/5pkgs/simple/passwdqc-utils/default.nix @@ -0,0 +1,37 @@ +{ stdenv, pam, + fetchurl, lib, + wordset-file ? null, # set your own wordset-file + ... }: + +stdenv.mkDerivation rec { + name = "passwdqc-utils-${version}"; + version = "1.3.0"; + buildInputs = [ pam ]; + + src = fetchurl { + url = "http://www.openwall.com/passwdqc/passwdqc-${version}.tar.gz"; + sha256 = "0l3zbrp4pvah0dz33m48aqlz9nx663cc1fqhnlwr0p853b10la93"; + }; + + buildTargets = "utils"; + installFlags= [ "BINDIR=$(out)/bin" + "CONFDIR=$(out)/etc" + "SHARED_LIBDIR=$(out)/lib" + "DEVEL_LIBDIR=$(out)/lib" + "SECUREDIR=$(out)/lib/security" + "INCLUDEDIR=$(out)/include" + "MANDIR=$(out)/man" ]; + + patchPhase = lib.optionalString (wordset-file != null) '' + cp -f ${wordset-file} wordset_4k.c + ''; + + installTargets = "install_lib install_utils"; + + meta = { + description = "passwdqc utils (pwqgen,pwqcheck) and library"; + license = stdenv.lib.licenses.bsd3; + maintainers = [ stdenv.lib.maintainers.makefu ]; + patforms = stdenv.lib.platforms.linux; # more installFlags must be set for Darwin,Solaris + }; +} -- cgit v1.2.3 From 2a3a3248def505c64c3f596acefa894959d4a20d Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 12 Dec 2017 21:06:21 +0100 Subject: cidr2glob: init Based on https://gist.github.com/speshak/b62fa28b49377cda8047cb227837244c --- krebs/5pkgs/simple/cidr2glob.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 krebs/5pkgs/simple/cidr2glob.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/cidr2glob.nix b/krebs/5pkgs/simple/cidr2glob.nix new file mode 100644 index 000000000..9b0b3f86b --- /dev/null +++ b/krebs/5pkgs/simple/cidr2glob.nix @@ -0,0 +1,30 @@ +{ python, writeScriptBin, ... }: + +let + pythonEnv = python.withPackages (ps: [ ps.netaddr ]); +in + writeScriptBin "cidr2glob" '' + #! ${pythonEnv}/bin/python + + import netaddr + import re + import sys + + def cidr2glob(cidr): + net = netaddr.IPNetwork(cidr) + + if net.prefixlen <= 8: + return map(lambda subnet: re.sub(r'\.0\.0\.0$', '.*', str(subnet.ip)), net.subnet(8)) + elif net.prefixlen <= 16: + return map(lambda subnet: re.sub(r'\.0\.0$', '.*', str(subnet.ip)), net.subnet(16)) + elif net.prefixlen <= 24: + return map(lambda subnet: re.sub(r'\.0$', '.*', str(subnet.ip)), net.subnet(24)) + else: + return map(lambda ip: str(ip), list(net)) + + if __name__ == "__main__": + for cidr in sys.stdin: + for glob in cidr2glob(cidr): + print glob + + '' -- cgit v1.2.3 From f3f61c85fd66f496bbaa850a6a01db2a79914ae6 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 13 Dec 2017 15:19:19 +0100 Subject: haskellPackages.nix-diff: 1.0.0 -> 1.0.0-krebs1 --- krebs/5pkgs/haskell/nix-diff.nix | 22 ---------------------- krebs/5pkgs/haskell/nix-diff/default.nix | 25 +++++++++++++++++++++++++ krebs/5pkgs/haskell/nix-diff/nixos-system.patch | 18 ++++++++++++++++++ 3 files changed, 43 insertions(+), 22 deletions(-) delete mode 100644 krebs/5pkgs/haskell/nix-diff.nix create mode 100644 krebs/5pkgs/haskell/nix-diff/default.nix create mode 100644 krebs/5pkgs/haskell/nix-diff/nixos-system.patch (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/nix-diff.nix b/krebs/5pkgs/haskell/nix-diff.nix deleted file mode 100644 index 2070dbd2e..000000000 --- a/krebs/5pkgs/haskell/nix-diff.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ mkDerivation, attoparsec, base, containers, Diff, fetchgit, mtl -, nix-derivation, optparse-generic, stdenv, system-filepath, text -, unix, vector -}: -mkDerivation { - pname = "nix-diff"; - version = "1.0.0"; - src = fetchgit { - url = "https://github.com/Gabriel439/nix-diff"; - sha256 = "1k00nx8pannqmpzadkwfrs6bf79yk22ynhd033z5rsyw0m8fcz9k"; - rev = "e32ffa2c7f38b47a71325a042c1d887fb46cdf7d"; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - attoparsec base containers Diff mtl nix-derivation optparse-generic - system-filepath text unix vector - ]; - homepage = "https://github.com/Gabriel439/nix-diff"; - description = "Explain why two Nix derivations differ"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/krebs/5pkgs/haskell/nix-diff/default.nix b/krebs/5pkgs/haskell/nix-diff/default.nix new file mode 100644 index 000000000..df0315048 --- /dev/null +++ b/krebs/5pkgs/haskell/nix-diff/default.nix @@ -0,0 +1,25 @@ +{ mkDerivation, attoparsec, base, containers, Diff, fetchgit, mtl +, nix-derivation, optparse-generic, stdenv, system-filepath, text +, unix, vector +}: +mkDerivation { + pname = "nix-diff"; + version = "1.0.0-krebs1"; + src = fetchgit { + url = "https://github.com/Gabriel439/nix-diff"; + sha256 = "1k00nx8pannqmpzadkwfrs6bf79yk22ynhd033z5rsyw0m8fcz9k"; + rev = "e32ffa2c7f38b47a71325a042c1d887fb46cdf7d"; + }; + patches = [ + ./nixos-system.patch + ]; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + attoparsec base containers Diff mtl nix-derivation optparse-generic + system-filepath text unix vector + ]; + homepage = "https://github.com/Gabriel439/nix-diff"; + description = "Explain why two Nix derivations differ"; + license = stdenv.lib.licenses.bsd3; +} diff --git a/krebs/5pkgs/haskell/nix-diff/nixos-system.patch b/krebs/5pkgs/haskell/nix-diff/nixos-system.patch new file mode 100644 index 000000000..03e186aa9 --- /dev/null +++ b/krebs/5pkgs/haskell/nix-diff/nixos-system.patch @@ -0,0 +1,18 @@ +diff --git a/src/Main.hs b/src/Main.hs +index 959ab8e..d3b6077 100644 +--- a/src/Main.hs ++++ b/src/Main.hs +@@ -95,7 +95,12 @@ pathToText path = + underneath `/nix/store`, but this is the overwhelmingly common use case + -} + derivationName :: FilePath -> Text +-derivationName = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText ++derivationName p = ++ if Data.Text.isPrefixOf "nixos-system" s ++ then "nixos-system" ++ else s ++ where ++ s = Data.Text.dropEnd 4 . Data.Text.drop 44 . pathToText $ p + + -- | Group input derivations by their name + groupByName :: Map FilePath (Set Text) -> Map Text (Map FilePath (Set Text)) -- cgit v1.2.3 From 939976b0cc1166f0a212b283cc1c8022a784b648 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 15 Dec 2017 00:14:30 +0100 Subject: populate: 1.2.5 -> 2.0.0 --- krebs/5pkgs/simple/populate/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/populate/default.nix b/krebs/5pkgs/simple/populate/default.nix index 78ee2f042..0880b1d38 100644 --- a/krebs/5pkgs/simple/populate/default.nix +++ b/krebs/5pkgs/simple/populate/default.nix @@ -1,24 +1,24 @@ -{ coreutils, fetchgit, git, jq, openssh, proot, rsync, stdenv, ... }: +{ coreutils, fetchgit, git, gnused, jq, openssh, rsync, stdenv, ... }: let PATH = stdenv.lib.makeBinPath [ coreutils git + gnused jq openssh - proot rsync ]; in stdenv.mkDerivation rec { name = "populate"; - version = "1.2.5"; + version = "2.0.0"; src = fetchgit { url = http://cgit.ni.krebsco.de/populate; rev = "refs/tags/v${version}"; - sha256 = "10s4x117zp5whqq991xzw1i2jc1xhl580kx8hhzv8f1b4c9carx1"; + sha256 = "01cvrg3m2ypg59in1qlr3rd8yzpf002k6pzjls2qb68jwkyf0h2n"; }; phases = [ -- cgit v1.2.3 From 92a34559eebb73cd71e9aa8e11565f1a8f2cb437 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 15 Dec 2017 03:29:00 +0100 Subject: populate: 2.0.0 -> 2.1.0 --- krebs/5pkgs/simple/populate/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/populate/default.nix b/krebs/5pkgs/simple/populate/default.nix index 0880b1d38..62e3ab216 100644 --- a/krebs/5pkgs/simple/populate/default.nix +++ b/krebs/5pkgs/simple/populate/default.nix @@ -1,24 +1,27 @@ -{ coreutils, fetchgit, git, gnused, jq, openssh, rsync, stdenv, ... }: +{ coreutils, fetchgit, findutils, git, gnused, jq, openssh, pass, rsync, stdenv +}: let PATH = stdenv.lib.makeBinPath [ coreutils + findutils git gnused jq openssh + pass rsync ]; in stdenv.mkDerivation rec { name = "populate"; - version = "2.0.0"; + version = "2.1.0"; src = fetchgit { url = http://cgit.ni.krebsco.de/populate; rev = "refs/tags/v${version}"; - sha256 = "01cvrg3m2ypg59in1qlr3rd8yzpf002k6pzjls2qb68jwkyf0h2n"; + sha256 = "0cr50y6h6nps0qgpmi01h0z9wzpv2704y5zgx2salk1grkmvcfmh"; }; phases = [ -- cgit v1.2.3