tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
code-browser: 7.1.20 -> 8.0
Jorge Acereda
4 years ago
0241614f
89f9319f
+32
-25
2 changed files
expand all
collapse all
unified
split
pkgs
applications
editors
code-browser
default.nix
top-level
all-packages.nix
+29
-20
pkgs/applications/editors/code-browser/default.nix
···
1
{ lib, stdenv
2
, fetchurl
3
, copper
4
-
, ruby
5
, python3
6
-
, qtbase
7
-
, gtk3
8
, pkg-config
9
-
, withQt ? false
10
-
, withGtk ? false, wrapQtAppsHook ? null
0
0
11
}:
12
-
stdenv.mkDerivation rec {
13
pname = "code-browser";
14
-
version = "7.1.20";
15
src = fetchurl {
16
url = "https://tibleiz.net/download/code-browser-${version}-src.tar.gz";
17
-
sha256 = "1svi0v3h42h2lrb8c7pjvqc8019v1p20ibsnl48pfhl8d96mmdnz";
18
};
19
postPatch = ''
20
substituteInPlace Makefile --replace "LFLAGS=-no-pie" "LFLAGS=-no-pie -L."
0
0
0
21
substituteInPlace libs/copper-ui/Makefile --replace "moc -o" "${qtbase.dev}/bin/moc -o"
22
-
patchShebangs .
23
-
'';
0
0
0
0
0
0
0
24
nativeBuildInputs = [ copper
25
python3
26
-
ruby
27
-
qtbase
28
-
gtk3
29
pkg-config
30
]
31
-
++ lib.optionals withQt [ wrapQtAppsHook ];
0
0
32
buildInputs = lib.optionals withQt [ qtbase ]
33
-
++ lib.optionals withGtk [ gtk3 ];
0
34
makeFlags = [
35
"prefix=$(out)"
36
"COPPER=${copper}/bin/copper-elf64"
37
"with-local-libs"
38
-
"QINC=${qtbase.dev}/include"
39
]
40
-
++ lib.optionals withQt [ "UI=qt" ]
41
-
++ lib.optionals withGtk [ "UI=gtk" ];
42
-
43
-
dontWrapQtApps = true;
0
44
45
meta = with lib; {
46
description = "Folding text editor, designed to hierarchically structure any kind of text file and especially source code";
···
1
{ lib, stdenv
2
, fetchurl
3
, copper
0
4
, python3
0
0
5
, pkg-config
6
+
, withQt ? false, qtbase ? null, wrapQtAppsHook ? null
7
+
, withGtk2 ? false, gtk2
8
+
, withGtk3 ? false, gtk3
9
+
, mkDerivation ? stdenv.mkDerivation
10
}:
11
+
mkDerivation rec {
12
pname = "code-browser";
13
+
version = "8.0";
14
src = fetchurl {
15
url = "https://tibleiz.net/download/code-browser-${version}-src.tar.gz";
16
+
sha256 = "sha256-beCp4lx4MI1+hVgWp2h3piE/zu51zfwQdB5g7ImgmwY=";
17
};
18
postPatch = ''
19
substituteInPlace Makefile --replace "LFLAGS=-no-pie" "LFLAGS=-no-pie -L."
20
+
patchShebangs .
21
+
''
22
+
+ lib.optionalString withQt ''
23
substituteInPlace libs/copper-ui/Makefile --replace "moc -o" "${qtbase.dev}/bin/moc -o"
24
+
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: qt"
25
+
''
26
+
+ lib.optionalString withGtk2 ''
27
+
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: gtk2"
28
+
''
29
+
+ lib.optionalString withGtk3 ''
30
+
substituteInPlace libs/copper-ui/Makefile --replace "all: qt gtk gtk2" "all: gtk"
31
+
''
32
+
;
33
nativeBuildInputs = [ copper
34
python3
0
0
0
35
pkg-config
36
]
37
+
++ lib.optionals withGtk2 [ gtk2 ]
38
+
++ lib.optionals withGtk3 [ gtk3 ]
39
+
++ lib.optionals withQt [ qtbase wrapQtAppsHook ];
40
buildInputs = lib.optionals withQt [ qtbase ]
41
+
++ lib.optionals withGtk2 [ gtk2 ]
42
+
++ lib.optionals withGtk3 [ gtk3 ];
43
makeFlags = [
44
"prefix=$(out)"
45
"COPPER=${copper}/bin/copper-elf64"
46
"with-local-libs"
0
47
]
48
+
++ lib.optionals withQt [ "QINC=${qtbase.dev}/include"
49
+
"UI=qt"
50
+
]
51
+
++ lib.optionals withGtk2 [ "UI=gtk2" ]
52
+
++ lib.optionals withGtk3 [ "UI=gtk" ];
53
54
meta = with lib; {
55
description = "Folding text editor, designed to hierarchically structure any kind of text file and especially source code";
+3
-5
pkgs/top-level/all-packages.nix
···
4283
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
4284
};
4285
4286
-
code-browser-qt = libsForQt5.callPackage ../applications/editors/code-browser { withQt = true;
4287
-
};
4288
-
code-browser-gtk = callPackage ../applications/editors/code-browser { withGtk = true;
4289
-
qtbase = qt5.qtbase;
4290
-
};
4291
4292
c14 = callPackage ../applications/networking/c14 { };
4293
···
4283
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
4284
};
4285
4286
+
code-browser-qt = libsForQt5.callPackage ../applications/editors/code-browser { withQt = true; };
4287
+
code-browser-gtk2 = callPackage ../applications/editors/code-browser { withGtk2 = true; };
4288
+
code-browser-gtk = callPackage ../applications/editors/code-browser { withGtk3 = true; };
0
0
4289
4290
c14 = callPackage ../applications/networking/c14 { };
4291