From 68733092391f43d0fd9e04f095cdad826e2d54e8 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 2 Jan 2018 21:18:51 +0100 Subject: stockholm: {shell => cmds}.get-version --- krebs/5pkgs/simple/stockholm/default.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/stockholm/default.nix b/krebs/5pkgs/simple/stockholm/default.nix index 5705f086d..53c1ca5ba 100644 --- a/krebs/5pkgs/simple/stockholm/default.nix +++ b/krebs/5pkgs/simple/stockholm/default.nix @@ -92,6 +92,17 @@ -I "$target_path" ''); + cmds.get-version = pkgs.writeDash "get-version" '' + set -efu + hostname=''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} + version=git.$(${pkgs.git}/bin/git describe --always --dirty) + case $version in (*-dirty) + version=$version@$hostname + esac + date=$(${pkgs.coreutils}/bin/date +%y.%m) + echo "$date.$version" + ''; + cmds.install = pkgs.withGetopt { force-populate = { default = /* sh */ "false"; switch = true; }; quiet = { default = /* sh */ "false"; switch = true; }; @@ -205,7 +216,7 @@ init.env = pkgs.writeText "init.env" /* sh */ '' export HOSTNAME="$(${pkgs.nettools}/bin/hostname)" - export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${shell.get-version})}" + export STOCKHOLM_VERSION="''${STOCKHOLM_VERSION-$(${cmds.get-version})}" export quiet export system @@ -274,16 +285,6 @@ fi ''; - shell.get-version = pkgs.writeDash "stockholm.get-version" '' - set -efu - version=git.$(${pkgs.git}/bin/git describe --always --dirty) - case $version in (*-dirty) - version=$version@$HOSTNAME - esac - date=$(${pkgs.coreutils}/bin/date +%y.%m) - echo "$date.$version" - ''; - in pkgs.writeOut "stockholm" (lib.mapAttrs' (name: link: -- cgit v1.2.3 From 9da4f1242ad782a54b524f6c470cfe82be4a63b4 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 6 Jan 2018 20:49:58 +0100 Subject: pkgs.internetarchive: fix build --- krebs/5pkgs/simple/internetarchive/default.nix | 33 +++++++++++++------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/internetarchive/default.nix b/krebs/5pkgs/simple/internetarchive/default.nix index f5e1bbff3..2f55e6f42 100644 --- a/krebs/5pkgs/simple/internetarchive/default.nix +++ b/krebs/5pkgs/simple/internetarchive/default.nix @@ -1,38 +1,39 @@ -{ pkgs, fetchFromGitHub, ... }: +{ stdenv, pkgs, fetchPypi, ... }: with pkgs.python3Packages; buildPythonPackage rec { pname = "internetarchive"; version = "1.7.3"; name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "0x3saklabdx7qrr11h5bjfd75hfbih7pw5gvl2784zvvvrqrz45g"; + }; + propagatedBuildInputs = [ requests - jsonpatch - docopt - clint - six - schema - backports_csv + jsonpatch + docopt + clint + six + schema + backports_csv ]; -# check only works when cloned from git repo + # check only works when cloned from git repo doCheck = false; + checkInputs = [ pytest - responses + responses ]; prePatch = '' sed -i "s/'schema.*'/'schema>=0.4.0'/" setup.py - ''; - - src = fetchPypi { - inherit pname version; - sha256 = "0x3saklabdx7qrr11h5bjfd75hfbih7pw5gvl2784zvvvrqrz45g"; - }; + ''; meta = with stdenv.lib; { description = "python library and cli for uploading files to internet archive"; license = licenses.agpl3; }; - } -- cgit v1.2.3 From 05c6e0b86c3cc59662d8daf26e81127a18a96a50 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 8 Jan 2018 09:14:48 +0100 Subject: pkgs.internetarchive: remove fetchPypi, coming from python3Packages --- krebs/5pkgs/simple/internetarchive/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/internetarchive/default.nix b/krebs/5pkgs/simple/internetarchive/default.nix index 2f55e6f42..3c83093be 100644 --- a/krebs/5pkgs/simple/internetarchive/default.nix +++ b/krebs/5pkgs/simple/internetarchive/default.nix @@ -1,4 +1,4 @@ -{ stdenv, pkgs, fetchPypi, ... }: +{ stdenv, pkgs, ... }: with pkgs.python3Packages; buildPythonPackage rec { pname = "internetarchive"; -- cgit v1.2.3