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