Skip to content

Commit 17de7db

Browse files
committed
workbench: init at 43.3
1 parent 29a2290 commit 17de7db

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{ stdenv
2+
, lib
3+
, fetchFromGitHub
4+
, meson
5+
, ninja
6+
, pkg-config
7+
, desktop-file-utils
8+
, vte-gtk4
9+
, gtksourceview5
10+
, gjs
11+
, libadwaita
12+
, vala
13+
, blueprint-compiler
14+
, fetchpatch
15+
}:
16+
17+
stdenv.mkDerivation rec {
18+
pname = "workbench";
19+
version = "43.3";
20+
21+
src = fetchFromGitHub {
22+
owner = "sonnyp";
23+
repo = "Workbench";
24+
rev = "v${version}";
25+
hash = "sha256-T/aOOvb3DRu/T0+uFMf3sx46U5LT544NQ45TmEBnkAo=";
26+
fetchSubmodules = true;
27+
};
28+
29+
patches = [
30+
# Do not copy files with source permissions into home directory while
31+
# running Workbench, see https://github.com/sonnyp/Workbench/pull/188
32+
(fetchpatch {
33+
url = "https://github.com/sonnyp/Workbench/commit/c553f932c952057674c3333e4af84044153b76d7.patch";
34+
hash = "sha256-pFj2LvqJE7uGhCYs6GL2a7tj4n2BBoKcPzD1K1JZ3Rs=";
35+
name = "do-not-copy-source-perms.patch";
36+
})
37+
];
38+
39+
postPatch = ''
40+
substituteInPlace src/meson.build --replace "/app/bin/blueprint-compiler" "blueprint-compiler"
41+
substituteInPlace troll/gjspack/bin/gjspack \
42+
--replace "#!/usr/bin/env -S gjs -m" "#!${gjs}/bin/gjs -m"
43+
'';
44+
45+
preFixup = ''
46+
# https://github.com/NixOS/nixpkgs/issues/31168#issuecomment-341793501
47+
sed -e '2iimports.package._findEffectiveEntryPointName = () => "re.sonny.Workbench"' \
48+
-i $out/bin/re.sonny.Workbench
49+
gappsWrapperArgs+=(--prefix PATH : $out/bin)
50+
'';
51+
52+
dontPatchShebangs = true;
53+
54+
nativeBuildInputs = [
55+
blueprint-compiler
56+
desktop-file-utils
57+
meson
58+
ninja
59+
pkg-config
60+
vala
61+
];
62+
63+
buildInputs = [
64+
gjs
65+
gtksourceview5
66+
libadwaita
67+
vte-gtk4
68+
];
69+
70+
doCheck = true;
71+
72+
meta = with lib; {
73+
description = "Learn and prototype with GNOME technologies";
74+
homepage = "https://github.com/sonnyp/Workbench";
75+
license = licenses.gpl3Only;
76+
maintainers = with maintainers; [ onny ];
77+
platforms = platforms.unix;
78+
};
79+
}

pkgs/top-level/all-packages.nix

+2
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,8 @@ with pkgs;
11421142
name = "find-xml-catalogs-hook";
11431143
} ../build-support/setup-hooks/find-xml-catalogs.sh;
11441144

1145+
workbench = callPackage ../development/tools/workbench { };
1146+
11451147
wrapGAppsHook = callPackage ../build-support/setup-hooks/wrap-gapps-hook {
11461148
makeWrapper = makeBinaryWrapper;
11471149
};

0 commit comments

Comments
 (0)