tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
junction: 1.5.0 -> 1.6
hqurve
3 years ago
01b794ca
19bf0264
+20
-4
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
junction
default.nix
+20
-4
pkgs/applications/misc/junction/default.nix
···
2
2
, stdenv
3
3
, fetchFromGitHub
4
4
, appstream-glib
5
5
+
, blueprint-compiler
5
6
, desktop-file-utils
6
7
, gobject-introspection
7
8
, meson
···
16
17
17
18
stdenv.mkDerivation rec {
18
19
pname = "junction";
19
19
-
version = "1.5.0";
20
20
+
version = "1.6";
20
21
21
22
src = fetchFromGitHub {
22
23
owner = "sonnyp";
23
24
repo = "junction";
24
25
rev = "v${version}";
25
25
-
sha256 = "sha256-jS4SHh1BB8jk/4EP070X44C4n3GjyCz8ozgK8v5lbqc=";
26
26
+
sha256 = "sha256-95lKap0VKLxX5Vax2tK0cAcJ/XgQddoN46tXHo+MtYc=";
27
27
+
fetchSubmodules = true;
26
28
};
27
29
28
30
nativeBuildInputs = [
29
31
appstream-glib
32
32
+
blueprint-compiler
30
33
desktop-file-utils
31
34
gobject-introspection
32
35
meson
···
42
45
libportal-gtk4
43
46
];
44
47
48
48
+
postPatch = ''
49
49
+
# gjs uses the invocation name to add gresource files
50
50
+
# - https://gitlab.gnome.org/GNOME/gjs/-/blob/6aca7b50785fa1638f144b17060870d721e3f65a/modules/script/package.js#L159
51
51
+
# - https://gitlab.gnome.org/GNOME/gjs/-/blob/6aca7b50785fa1638f144b17060870d721e3f65a/modules/script/package.js#L37
52
52
+
# To work around this, we manually set the the name as done in foliate
53
53
+
# - https://github.com/NixOS/nixpkgs/blob/3bacde6273b09a21a8ccfba15586fb165078fb62/pkgs/applications/office/foliate/default.nix#L23
54
54
+
sed -i "1 a imports.package._findEffectiveEntryPointName = () => 're.sonny.Junction';" src/bin.js
55
55
+
56
56
+
# /usr/bin/env is not accessible in build environment
57
57
+
substituteInPlace troll/gjspack/bin/gjspack --replace "/usr/bin/env -S gjs" "${gjs}/bin/gjs"
58
58
+
'';
59
59
+
45
60
postInstall = ''
46
46
-
# autoPatchShebangs does not like "/usr/bin/env -S gjs"
47
47
-
substituteInPlace $out/bin/re.sonny.Junction --replace "/usr/bin/env -S gjs" "/usr/bin/gjs"
61
61
+
# autoPatchShebangs does not like "/usr/bin/env -S <environment-setting> gjs -m"
62
62
+
sed -i "1s|.*|#!/usr/bin/gjs -m|" $out/bin/re.sonny.Junction
48
63
'';
49
64
50
65
meta = with lib; {
66
66
+
mainProgram = "re.sonny.Junction";
51
67
description = "Choose the application to open files and links";
52
68
homepage = "https://apps.gnome.org/en/app/re.sonny.Junction/";
53
69
license = licenses.gpl3Plus;