tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
unar: minor cleanups
Peter Hoeg
7 years ago
0e23e81c
ea145b68
+22
-24
1 changed file
expand all
collapse all
unified
split
pkgs
tools
archivers
unar
default.nix
+22
-24
pkgs/tools/archivers/unar/default.nix
···
1
{ stdenv, fetchurl, gnustep, unzip, bzip2, zlib, icu, openssl }:
2
3
-
stdenv.mkDerivation rec {
4
-
name = "${pname}-${version}";
5
pname = "unar";
0
0
0
6
version = "1.10.1";
7
8
src = fetchurl {
···
10
sha256 = "0aq9zlar5vzr5qxphws8dm7ax60bsfsw77f4ciwa5dq5lla715j0";
11
};
12
13
-
buildInputs = [
14
-
gnustep.make unzip gnustep.base bzip2.dev
15
-
zlib.dev icu.dev openssl.dev
16
-
];
17
18
-
postPatch = ''
19
-
substituteInPlace Makefile.linux \
20
-
--replace "CC = gcc" "CC=cc" \
21
-
--replace "CXX = g++" "CXX=c++" \
22
-
--replace "OBJCC = gcc" "OBJCC=cc" \
23
-
--replace "OBJCXX = g++" "OBJCXX=c++"
24
25
-
substituteInPlace ../UniversalDetector/Makefile.linux \
26
-
--replace "CC = gcc" "CC=cc" \
27
-
--replace "CXX = g++" "CXX=c++" \
28
-
--replace "OBJCC = gcc" "OBJCC=c" \
29
-
--replace "OBJCXX = g++" "OBJCXX=c++"
0
0
0
0
0
30
'';
31
32
makefile = "Makefile.linux";
···
34
sourceRoot = "./The Unarchiver/XADMaster";
35
36
installPhase = ''
37
-
mkdir -p $out/bin
38
-
cp lsar $out/bin
39
-
cp unar $out/bin
40
41
-
mkdir -p $out/share/man/man1
42
-
cp ../Extra/lsar.1 $out/share/man/man1
43
-
cp ../Extra/unar.1 $out/share/man/man1
44
45
mkdir -p $out/etc/bash_completion.d
46
cp ../Extra/lsar.bash_completion $out/etc/bash_completion.d/lsar
47
cp ../Extra/unar.bash_completion $out/etc/bash_completion.d/unar
0
0
48
'';
49
50
meta = with stdenv.lib; {
···
55
zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN, \
56
and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble, \
57
Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH, \
58
-
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
59
'';
60
license = with licenses; [ lgpl21Plus ];
61
platforms = with platforms; linux;
···
1
{ stdenv, fetchurl, gnustep, unzip, bzip2, zlib, icu, openssl }:
2
3
+
let
0
4
pname = "unar";
5
+
6
+
in stdenv.mkDerivation rec {
7
+
name = "${pname}-${version}";
8
version = "1.10.1";
9
10
src = fetchurl {
···
12
sha256 = "0aq9zlar5vzr5qxphws8dm7ax60bsfsw77f4ciwa5dq5lla715j0";
13
};
14
15
+
buildInputs = [ gnustep.base bzip2 icu openssl zlib ];
0
0
0
16
17
+
nativeBuildInputs = [ gnustep.make unzip ];
0
0
0
0
0
18
19
+
enableParallelBuilding = true;
20
+
21
+
postPatch = ''
22
+
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
23
+
substituteInPlace $f \
24
+
--replace "CC = gcc" "CC=cc" \
25
+
--replace "CXX = g++" "CXX=c++" \
26
+
--replace "OBJCC = gcc" "OBJCC=cc" \
27
+
--replace "OBJCXX = g++" "OBJCXX=c++"
28
+
done
29
'';
30
31
makefile = "Makefile.linux";
···
33
sourceRoot = "./The Unarchiver/XADMaster";
34
35
installPhase = ''
36
+
runHook preInstall
0
0
37
38
+
install -Dm755 -t $out/bin lsar unar
39
+
install -Dm644 -t $out/share/man/man1 ../Extra/{lsar,unar}.1
0
40
41
mkdir -p $out/etc/bash_completion.d
42
cp ../Extra/lsar.bash_completion $out/etc/bash_completion.d/lsar
43
cp ../Extra/unar.bash_completion $out/etc/bash_completion.d/unar
44
+
45
+
runHook postInstall
46
'';
47
48
meta = with stdenv.lib; {
···
53
zip, RAR, 7z, tar, gzip, bzip2, LZMA, XZ, CAB, MSI, NSIS, EXE, ISO, BIN, \
54
and split file formats, as well as the old Stuffit, Stuffit X, DiskDouble, \
55
Compact Pro, Packit, cpio, compress (.Z), ARJ, ARC, PAK, ACE, ZOO, LZH, \
56
+
ADF, DMS, LZX, PowerPacker, LBR, Squeeze, Crunch, and other old formats.
57
'';
58
license = with licenses; [ lgpl21Plus ];
59
platforms = with platforms; linux;