tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
rsbep: 0.1.0 -> 0.2.0
Erik Arvstedt
4 years ago
3fc0f7ab
4c817c73
+19
-10
1 changed file
expand all
collapse all
unified
split
pkgs
tools
backup
rsbep
default.nix
+19
-10
pkgs/tools/backup/rsbep/default.nix
···
1
1
-
{ stdenv, lib, coreutils, gnused, gawk, fetchurl }:
1
1
+
{ lib, stdenv, coreutils, gawk, fetchFromGitHub }:
2
2
3
3
-
stdenv.mkDerivation {
3
3
+
stdenv.mkDerivation rec {
4
4
pname = "rsbep";
5
5
-
version = "0.1.0";
5
5
+
version = "0.2.0";
6
6
7
7
-
src = fetchurl {
8
8
-
url = "https://www.thanassis.space/rsbep-0.1.0-ttsiodras.tar.bz2";
9
9
-
sha256 = "1zji34kc9srxp0h1s1m7k60mvgsir1wrx1n3wc990jszfplr32zc";
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "ttsiodras";
9
9
+
repo = "rsbep-backup";
10
10
+
rev = "v${version}";
11
11
+
sha256 = "0is4jgil3wdqbvx9h66xcyzbqy84ndyydnnay2g9k81a4mcz4dns";
10
12
};
11
13
12
14
postFixup = ''
···
18
20
mv rsbep_chopper $libexecDir
19
21
20
22
# Fix store dependencies in scripts
21
21
-
path="export PATH=$out/bin:$libexecDir:${lib.makeBinPath [ coreutils gnused gawk ]}"
23
23
+
path="export PATH=$out/bin:$libexecDir:${lib.makeBinPath [ coreutils gawk ]}"
22
24
sed -i "2i$path" freeze.sh
23
25
sed -i "2i$path" melt.sh
24
24
-
25
25
-
substituteInPlace freeze.sh --replace /bin/ls ls
26
26
27
27
# Remove unneded binary
28
28
rm poorZFS.py
29
29
'';
30
30
31
31
+
doInstallCheck = true;
32
32
+
installCheckPhase = ''
33
33
+
cd $TMP
34
34
+
echo hello > input
35
35
+
$out/bin/freeze.sh input > packed
36
36
+
$out/bin/melt.sh packed > output
37
37
+
diff -u input output
38
38
+
'';
39
39
+
31
40
meta = with lib; {
32
41
description = "Create resilient backups with Reed-Solomon error correction and byte-spreading";
33
42
homepage = "https://www.thanassis.space/rsbep.html";
34
34
-
license = licenses.gpl3;
43
43
+
license = licenses.gpl3Plus;
35
44
maintainers = [ maintainers.earvstedt ];
36
45
};
37
46
}