diff options
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/apt-cacher-ng/default.nix | 4 | ||||
-rw-r--r-- | krebs/5pkgs/builders.nix | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/krebs/5pkgs/apt-cacher-ng/default.nix b/krebs/5pkgs/apt-cacher-ng/default.nix index abf8d677a..53736dcfb 100644 --- a/krebs/5pkgs/apt-cacher-ng/default.nix +++ b/krebs/5pkgs/apt-cacher-ng/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "apt-cacher-ng-${version}"; - version = "0.9.3"; + version = "0.9.3.2"; src = fetchurl { url = "http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_${version}.orig.tar.xz"; - sha256 = "1bd7l1wg0q1p9pg0v6lqflf2znydx8mrh2jxbvv6xsrp1473nfwg"; + sha256 = "1bvng9mwrggvc93q2alj0x72i56wifnjs2dsycr17mapsv0f2gnc"; }; NIX_LDFLAGS = "-lpthread"; diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix index 4c087bc44..841543819 100644 --- a/krebs/5pkgs/builders.nix +++ b/krebs/5pkgs/builders.nix @@ -253,5 +253,27 @@ rec { ${pkgs.cabal2nix}/bin/cabal2nix ${path} > $out ''); + writePython2 = name: src: pkgs.runCommand name {} /* sh */ '' + name=${assert types.filename.check name; name} + src=${shell.escape src} + + # syntax check + printf '%s' "$src" > src.py + ${pkgs.python2}/bin/python -m py_compile src.py + + cp src.py "$out" + ''; + + writePython3 = name: src: pkgs.runCommand name {} /* sh */ '' + name=${assert types.filename.check name; name} + src=${shell.escape src} + + # syntax check + printf '%s' "$src" > src.py + ${pkgs.python3}/bin/python -m py_compile src.py + + cp src.py "$out" + ''; + writeSed = makeScriptWriter "${pkgs.gnused}/bin/sed -f"; } |