diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2020-02-29 12:18:11 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2020-02-29 12:18:11 +0100 |
| commit | b02413acfbbb1e541fcb9218d6930dbf283c7211 (patch) | |
| tree | e6d1827123cefea4c25e83874fe4f2f6f2381a5e /nix | |
| parent | aa58927f86322757cc85fa469564e8b05ddcdcda (diff) | |
| parent | c39a6086a83c2547534d943e3611c4ce0524fafa (diff) | |
| download | utils-b02413acfbbb1e541fcb9218d6930dbf283c7211.tar utils-b02413acfbbb1e541fcb9218d6930dbf283c7211.tar.gz utils-b02413acfbbb1e541fcb9218d6930dbf283c7211.tar.bz2 utils-b02413acfbbb1e541fcb9218d6930dbf283c7211.tar.xz utils-b02413acfbbb1e541fcb9218d6930dbf283c7211.zip | |
Merge branch 'master' of git.yggdrasil.li:utils
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/default.nix | 2 | ||||
| -rw-r--r-- | nix/persistent-nix-shell.nix | 22 | ||||
| -rw-r--r-- | nix/worktime.nix | 22 |
3 files changed, 46 insertions, 0 deletions
diff --git a/nix/default.nix b/nix/default.nix index cef8800..097d092 100644 --- a/nix/default.nix +++ b/nix/default.nix | |||
| @@ -8,4 +8,6 @@ self: super: | |||
| 8 | rolling-directory = self.callPackage ./rolling-directory.nix {}; | 8 | rolling-directory = self.callPackage ./rolling-directory.nix {}; |
| 9 | recv = self.callPackage ./recv.nix {}; | 9 | recv = self.callPackage ./recv.nix {}; |
| 10 | notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; | 10 | notmuch-tcp = self.callPackage ./notmuch-tcp.nix {}; |
| 11 | persistent-nix-shell = self.callPackage ./persistent-nix-shell.nix {}; | ||
| 12 | worktime = self.callPackage ./worktime.nix {}; | ||
| 11 | } | 13 | } |
diff --git a/nix/persistent-nix-shell.nix b/nix/persistent-nix-shell.nix new file mode 100644 index 0000000..7b371c6 --- /dev/null +++ b/nix/persistent-nix-shell.nix | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | { stdenv | ||
| 2 | , zsh | ||
| 3 | }: | ||
| 4 | |||
| 5 | stdenv.mkDerivation rec { | ||
| 6 | pname = "persistent-nix-shell"; | ||
| 7 | version = "0.1"; | ||
| 8 | src = ../persistent-nix-shell; | ||
| 9 | |||
| 10 | phases = [ "buildPhase" "installPhase" ]; | ||
| 11 | |||
| 12 | inherit zsh; | ||
| 13 | |||
| 14 | buildPhase = '' | ||
| 15 | substituteAll $src persistent-nix-shell | ||
| 16 | ''; | ||
| 17 | |||
| 18 | installPhase = '' | ||
| 19 | install -m 0755 -D -t $out/bin \ | ||
| 20 | persistent-nix-shell | ||
| 21 | ''; | ||
| 22 | } | ||
diff --git a/nix/worktime.nix b/nix/worktime.nix new file mode 100644 index 0000000..ddab8b2 --- /dev/null +++ b/nix/worktime.nix | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | { stdenv | ||
| 2 | , python37 | ||
| 3 | }: | ||
| 4 | |||
| 5 | stdenv.mkDerivation rec { | ||
| 6 | pname = "worktime"; | ||
| 7 | version = "3"; | ||
| 8 | src = ../worktime.py; | ||
| 9 | |||
| 10 | phases = [ "buildPhase" "installPhase" ]; | ||
| 11 | |||
| 12 | python = python37.withPackages (ps: with ps; [pyxdg dateutil uritools requests configparser]); | ||
| 13 | |||
| 14 | buildPhase = '' | ||
| 15 | substituteAll $src worktime | ||
| 16 | ''; | ||
| 17 | |||
| 18 | installPhase = '' | ||
| 19 | install -m 0755 -D -t $out/bin \ | ||
| 20 | worktime | ||
| 21 | ''; | ||
| 22 | } | ||
