1
- { stdenv , lib , fetchFromGitHub , go , pkgs } :
1
+ { stdenv , fetchFromGitHub , go } :
2
2
3
- let
4
- removeExpr = ref : ''
5
- sed -i "s,${ ref } ,$(echo "${ ref } " | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" \
6
- '' ;
7
-
8
- in stdenv . mkDerivation rec {
9
- version = "0.14.23" ;
3
+ stdenv . mkDerivation rec {
4
+ version = "0.14.17" ;
10
5
name = "syncthing-${ version } " ;
11
6
12
7
src = fetchFromGitHub {
13
8
owner = "syncthing" ;
14
9
repo = "syncthing" ;
15
10
rev = "v${ version } " ;
16
- sha256 = "1himf8yhfpjsv5m068y2f6f696d7ip0jq7jmg69kn7035zlxicis " ;
11
+ sha256 = "0l220jnm8xwfc5jrznan15290al05bim5yyy4wngj9c55av6mlzq " ;
17
12
} ;
18
13
19
14
buildInputs = [ go ] ;
@@ -30,32 +25,15 @@ in stdenv.mkDerivation rec {
30
25
'' ;
31
26
32
27
installPhase = ''
33
- mkdir -p $out/bin $out/etc/systemd/{system,user}
34
-
28
+ mkdir -p $out/bin
35
29
cp bin/* $out/bin
36
- '' + lib . optionalString ( stdenv . isLinux ) ''
37
- substitute etc/linux-systemd/system/syncthing-resume.service \
38
- $out/etc/systemd/system/syncthing-resume.service \
39
- --replace /usr/bin/pkill ${ pkgs . procps } /bin/pkill
40
-
41
- substitute etc/linux-systemd/system/syncthing@.service \
42
- $out/etc/systemd/system/syncthing@.service \
43
- --replace /usr/bin/syncthing $out/bin/syncthing
44
-
45
- substitute etc/linux-systemd/user/syncthing.service \
46
- $out/etc/systemd/user/syncthing.service \
47
- --replace /usr/bin/syncthing $out/bin/syncthing
48
- '' ;
49
-
50
- preFixup = ''
51
- find $out/bin -type f -exec ${ removeExpr go } '{}' '+'
52
30
'' ;
53
31
54
- meta = with stdenv . lib ; {
32
+ meta = {
55
33
homepage = https://www.syncthing.net/ ;
56
34
description = "Open Source Continuous File Synchronization" ;
57
- license = licenses . mpl20 ;
58
- maintainers = with maintainers ; [ pshendry joko peterhoeg ] ;
59
- platforms = platforms . unix ;
35
+ license = stdenv . lib . licenses . mpl20 ;
36
+ maintainers = with stdenv . lib . maintainers ; [ pshendry joko peterhoeg ] ;
37
+ platforms = with stdenv . lib . platforms ; linux ++ freebsd ++ openbsd ++ netbsd ;
60
38
} ;
61
39
}
0 commit comments