diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-17 14:51:52 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-06-17 14:51:52 +0200 |
commit | 12eef53b67c28c3b448b2b1eb08b79509fb6cef4 (patch) | |
tree | b4c0dabc552d1507b518de7590155dfeef2debbd | |
parent | 8605a066d9eee11a5be37178434848d7b553e27d (diff) | |
download | nixos-12eef53b67c28c3b448b2b1eb08b79509fb6cef4.tar nixos-12eef53b67c28c3b448b2b1eb08b79509fb6cef4.tar.gz nixos-12eef53b67c28c3b448b2b1eb08b79509fb6cef4.tar.bz2 nixos-12eef53b67c28c3b448b2b1eb08b79509fb6cef4.tar.xz nixos-12eef53b67c28c3b448b2b1eb08b79509fb6cef4.zip |
Wrong file
-rw-r--r-- | custom/run-opossum@bragi.nix | 66 | ||||
-rw-r--r-- | custom/run-opossum_bragi.nix | 5 |
2 files changed, 3 insertions, 68 deletions
diff --git a/custom/run-opossum@bragi.nix b/custom/run-opossum@bragi.nix deleted file mode 100644 index 34452ef7..00000000 --- a/custom/run-opossum@bragi.nix +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | { stdenv | ||
2 | , zsh | ||
3 | , findutils | ||
4 | , coreutils | ||
5 | , makeWrapper | ||
6 | , wombat | ||
7 | , opossum | ||
8 | }: | ||
9 | |||
10 | let | ||
11 | version = "0.0.0"; | ||
12 | in stdenv.mkDerivation { | ||
13 | name = "run-opossum-${version}"; | ||
14 | buildInputs = [ makeWrapper ]; | ||
15 | src = builtins.toFile name '' | ||
16 | #!${zsh}/bin/zsh | ||
17 | |||
18 | oversized() { | ||
19 | l=$(du -BG -s -t 75 $BEUTEL | wc -l) | ||
20 | [[ $l -ge 1 ]] | ||
21 | } | ||
22 | |||
23 | echo "Started $(date)" > $LOGFILE | ||
24 | opossum &>> $LOGFILE | ||
25 | |||
26 | wombat search "(not (seen or hidden)) and (not forced)" | \ | ||
27 | xargs -r -n 1 -d '\n' -- wombat force \ | ||
28 | &>> $LOGFILE | ||
29 | |||
30 | find $BEUTEL -type f -iname '*.tgz.bak' -delete | ||
31 | |||
32 | if oversized; then | ||
33 | wombat search "(seen or hidden) and forced" | \ | ||
34 | while (read file && oversized); do | ||
35 | wombat reset $file | ||
36 | find $BEUTEL -type f -iname '*.tgz.bak' -delete | ||
37 | done | ||
38 | |||
39 | wombat search "seen or hidden" | \ | ||
40 | while (read file && oversized); do | ||
41 | wombat delete $file | ||
42 | size=$(du -BG $BEUTEL) | ||
43 | done | ||
44 | fi | ||
45 | |||
46 | echo "Ended $(date)" >> $LOGFILE | ||
47 | ''; | ||
48 | phases = [ "buildPhase" | ||
49 | "installPhase" | ||
50 | ]; | ||
51 | buildPhase = '' | ||
52 | cp -prd --no-preserve=timestamps $src run-opossum | ||
53 | ''; | ||
54 | installPhase = '' | ||
55 | mkdir -p $out/bin | ||
56 | cp run-opossum.sh $out/bin | ||
57 | chmod +x $out/bin/run-opossum | ||
58 | wrapProgram $out/bin/run-opossum \ | ||
59 | --prefix PATH : ${wombat}/bin \ | ||
60 | --prefix PATH : ${opossum}/bin \ | ||
61 | --prefix PATH : ${findutils}/bin \ | ||
62 | --prefix PATH : ${coreutils}/bin \ | ||
63 | --set BEUTEL $HOME/.beutel \ | ||
64 | --set LOGFILE $HOME/.last_opossum.log | ||
65 | ''; | ||
66 | } | ||
diff --git a/custom/run-opossum_bragi.nix b/custom/run-opossum_bragi.nix index bc8e4bb0..34452ef7 100644 --- a/custom/run-opossum_bragi.nix +++ b/custom/run-opossum_bragi.nix | |||
@@ -7,9 +7,10 @@ | |||
7 | , opossum | 7 | , opossum |
8 | }: | 8 | }: |
9 | 9 | ||
10 | stdenv.mkDerivation { | 10 | let |
11 | name = "run-opossum-${version}"; | ||
12 | version = "0.0.0"; | 11 | version = "0.0.0"; |
12 | in stdenv.mkDerivation { | ||
13 | name = "run-opossum-${version}"; | ||
13 | buildInputs = [ makeWrapper ]; | 14 | buildInputs = [ makeWrapper ]; |
14 | src = builtins.toFile name '' | 15 | src = builtins.toFile name '' |
15 | #!${zsh}/bin/zsh | 16 | #!${zsh}/bin/zsh |