diff --git a/pkgs/default.nix b/pkgs/default.nix index 4f8180de..75c62b8a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -2,9 +2,11 @@ { doggo = pkgs.callPackage ./doggo.nix { }; - gnome-shell-extension-pop-shell = pkgs.callPackage ./gnome-shell-extension-pop-shell.nix { }; + gnome-shell-extension-pop-shell = + pkgs.callPackage ./gnome-shell-extension-pop-shell.nix { }; libcs50 = pkgs.callPackage ./libcs50.nix { }; pop-launcher = pkgs.callPackage ./pop-launcher.nix { }; - pop-launcher-plugin-duckduckgo-bangs = pkgs.callPackage ./pop-launcher-plugin-duckduckgo-bangs.nix { }; + pop-launcher-plugin-duckduckgo-bangs = + pkgs.callPackage ./pop-launcher-plugin-duckduckgo-bangs.nix { }; tic-80 = pkgs.callPackage ./tic-80.nix { }; } diff --git a/pkgs/gnome-shell-extension-pop-shell.nix b/pkgs/gnome-shell-extension-pop-shell.nix index 2786122a..dc1b3e9b 100644 --- a/pkgs/gnome-shell-extension-pop-shell.nix +++ b/pkgs/gnome-shell-extension-pop-shell.nix @@ -1,8 +1,5 @@ { lib, stdenv, fetchFromGitHub, glib, nodePackages }: -let - INSTALLBASE = "$out/share/gnome-shell/extensions"; -in stdenv.mkDerivation rec { pname = "gnome-shell-extension-pop-shell"; version = "unstable-2021-11-30"; @@ -17,22 +14,24 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ glib nodePackages.typescript ]; skipConfigure = true; - # Rather than patching the installation, we can create our own easily. - installPhase = '' - mkdir -p ${INSTALLBASE}/${passthru.extensionUuid} - cp -r _build/* ${INSTALLBASE}/${passthru.extensionUuid}/ + makeFlags = [ + "INSTALLBASE=$(out)/share/gnome-shell/extensions" + "PLUGIN_BASE=$(out)/lib/pop-shell/launcher" + "SCRIPTS_BASE=$(out)/lib/pop-shell/scripts" + "UUID=${passthru.extensionUuid}" + ]; - # TODO: Uncomment once custom gsettings works. - # Unfortunately custom gsettings seems to be not properly integrated with NixOS yet. - # - # For more information, please track the following issue: - # https://github.com/NixOS/nixpkgs/issues/92265 - # - # It also contains additional links to related issues and whatnot. - #install -Dm644 keybindings/*.xml -t $out/share/gnome-control-center/keybindings + postInstall = '' + install -Dm644 $out/share/gnome-shell/extensions/${passthru.extensionUuid}/schemas/* -t "${glib.makeSchemaPath "$out" "${pname}-${version}"}" - # Export the custom GSettings schema. - install -Dm644 _build/schemas/* -t $out/share/glib-2.0/schemas + # TODO: Uncomment once custom gsettings works. + # Unfortunately custom gsettings seems to be not properly integrated with NixOS yet. + # + # For more information, please track the following issue: + # https://github.com/NixOS/nixpkgs/issues/92265 + # + # It also contains additional links to related issues and whatnot. + #install -Dm644 keybindings/*.xml -t $out/share/gnome-control-center/keybindings ''; passthru.extensionUuid = "pop-shell@system76.com"; @@ -41,5 +40,6 @@ stdenv.mkDerivation rec { description = "A keyboard-driven layer for GNOME shell"; license = licenses.gpl3; homepage = "https://github.com/pop-os/shell"; + platforms = platforms.linux; }; } diff --git a/pkgs/pop-launcher-plugin-duckduckgo-bangs.nix b/pkgs/pop-launcher-plugin-duckduckgo-bangs.nix index c3e0e3f9..0591c5a7 100644 --- a/pkgs/pop-launcher-plugin-duckduckgo-bangs.nix +++ b/pkgs/pop-launcher-plugin-duckduckgo-bangs.nix @@ -23,7 +23,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "sha256-qzlZ0dbdfZwEBuQXIUndVFye6RdX8aI39D/UCagMfZg="; meta = with lib; { description = "Pop launcher for searching with Duckduckgo bangs"; - homepage = "https://github.com/foo-dogsquared/pop-launcher-plugin-duckduckgo-bangs"; + homepage = + "https://github.com/foo-dogsquared/pop-launcher-plugin-duckduckgo-bangs"; license = licenses.gpl3; }; } diff --git a/pkgs/pop-launcher.nix b/pkgs/pop-launcher.nix index 08e1d2bf..bd141ea1 100644 --- a/pkgs/pop-launcher.nix +++ b/pkgs/pop-launcher.nix @@ -1,9 +1,7 @@ { lib, fetchFromGitHub, rustPlatform, pkg-config, openssl, gtk3 }: -let - distributionPluginPath = "$out/lib/pop-launcher"; -in -rustPlatform.buildRustPackage rec { +let distributionPluginPath = "$out/lib/pop-launcher"; +in rustPlatform.buildRustPackage rec { pname = "pop-launcher"; version = "1.1.0";