nixos-config/pkgs/pop-shell/default.nix

36 lines
1.1 KiB
Nix
Raw Normal View History

2021-09-19 11:58:01 +02:00
{ lib, fetchFromGitHub, stdenv, glib, nodePackages, gjs }:
stdenv.mkDerivation rec {
pname = "pop-shell";
2021-10-26 14:20:31 +02:00
version = "2021-10-24";
2021-09-19 11:58:01 +02:00
src = fetchFromGitHub {
owner = "pop-os";
repo = "shell";
2021-10-26 14:20:31 +02:00
rev = "d39f185ee16cb024f86163ea2f7d24c7e15b695d";
sha256 = "2RsfW6uFVl2F3eVnezD2vrOqdA4Poap5wEgtgnse8aI=";
2021-09-19 11:58:01 +02:00
};
nativeBuildInputs = [ glib nodePackages.typescript gjs ];
buildInputs = [ gjs ];
2021-10-19 11:26:22 +02:00
preBuildHook = ''
find . -name '*.ts' -exec sed -i -E 's|^#!/usr/bin/gjs|#!/usr/bin/env gjs|' \{\} \;
2021-10-21 23:57:16 +02:00
find . -name '*.ts' -exec sed -i -E 's|\["gjs", path]|[path]|' \{\} \;
find . -name '*.ts' -exec sed -i -E 's|`gjs $\{path}`|path|' \{\} \;
2021-10-19 11:26:22 +02:00
'';
2021-09-19 11:58:01 +02:00
# the gschema doesn't seem to be installed properly (see dconf)
makeFlags = [
"INSTALLBASE=$(out)/share/gnome-shell/extensions"
"PLUGIN_BASE=$(out)/share/pop-shell/launcher"
"SCRIPTS_BASE=$(out)/share/pop-shell/scripts"
];
2021-10-19 11:26:22 +02:00
postInstall = ''
chmod +x $out/share/gnome-shell/extensions/pop-shell@system76.com/floating_exceptions/main.js
chmod +x $out/share/gnome-shell/extensions/pop-shell@system76.com/color_dialog/main.js
'';
2021-09-19 11:58:01 +02:00
}