diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 5a41f96497f2..3296b7220485 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -296,9 +296,10 @@ in }) (mkIf serviceCfg.contractor.enable { - environment.systemPackages = with pkgs.pantheon; [ + environment.systemPackages = with pkgs.pantheon; [ contractor - extra-elementary-contracts + file-roller-contract + gnome-bluetooth-contract ]; environment.pathsToLink = [ diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix index 61436ba57ae5..3300dd2ec8c4 100644 --- a/pkgs/desktops/pantheon/default.nix +++ b/pkgs/desktops/pantheon/default.nix @@ -93,14 +93,18 @@ lib.makeScope pkgs.newScope (self: with self; { elementary-shortcut-overlay = callPackage ./desktop/elementary-shortcut-overlay { }; - extra-elementary-contracts = callPackage ./desktop/extra-elementary-contracts { - inherit (gnome) file-roller gnome-bluetooth; + file-roller-contract = callPackage ./desktop/file-roller-contract { + inherit (gnome) file-roller; }; gala = callPackage ./desktop/gala { inherit (gnome) gnome-desktop; }; + gnome-bluetooth-contract = callPackage ./desktop/gnome-bluetooth-contract { + inherit (gnome) gnome-bluetooth; + }; + wingpanel = callPackage ./desktop/wingpanel { }; wingpanel-with-indicators = callPackage ./desktop/wingpanel/wrapper.nix { @@ -217,4 +221,6 @@ lib.makeScope pkgs.newScope (self: with self; { elementary-screenshot-tool = elementary-screenshot; # added 2021-07-21 + extra-elementary-contracts = throw "extra-elementary-contracts has been removed as all contracts have been upstreamed."; # added 2021-12-01 + }) diff --git a/pkgs/desktops/pantheon/desktop/extra-elementary-contracts/default.nix b/pkgs/desktops/pantheon/desktop/extra-elementary-contracts/default.nix deleted file mode 100644 index c579997f5e83..000000000000 --- a/pkgs/desktops/pantheon/desktop/extra-elementary-contracts/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, stdenv -, substituteAll -, fetchFromGitHub -, file-roller -, gnome-bluetooth -}: - -stdenv.mkDerivation rec { - pname = "extra-elementary-contracts"; - version = "2018-08-21"; - - src = fetchFromGitHub { - owner = "worldofpeace"; - repo = pname; - rev = "a05dfb00695854163805b666185e3e9f31b6eb83"; - sha256 = "0fkaf2w4xg0n9faj74rgzy7gvd3yz112l058b157a3pr39vpci7g"; - }; - - patches = [ - (substituteAll { - src = ./exec-path.patch; - file_roller = file-roller; - gnome_bluetooth = gnome-bluetooth; - }) - ]; - - dontBuild = true; - dontConfigure = true; - - installPhase = '' - mkdir -p $out/share/contractor - - cp *.contract $out/share/contractor/ - ''; - - meta = with lib; { - description = "Extra contractor files for elementary"; - homepage = "https://github.com/worldofpeace/extra-elementary-contracts"; - license = licenses.gpl2; - maintainers = with maintainers; [ worldofpeace ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix b/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix new file mode 100644 index 000000000000..9f4d275f2462 --- /dev/null +++ b/pkgs/desktops/pantheon/desktop/file-roller-contract/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchFromGitHub +, substituteAll +, file-roller +}: + +stdenv.mkDerivation rec { + pname = "file-roller-contract"; + version = "unstable-2021-02-23"; + + src = fetchFromGitHub { + owner = "elementary"; + repo = pname; + rev = "cf001d84a7e2ddcfbee2cfdb19885798a869833e"; + sha256 = "sha256-jnXq44NiQiSYsvaBF828TklLg9d6z6n+gCZKgbFiERI="; + }; + + patches = [ + (substituteAll { + src = ./exec-path.patch; + file_roller = file-roller; + }) + ]; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/contractor + cp *.contract $out/share/contractor/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Contractor extension for File Roller"; + homepage = "https://github.com/elementary/file-roller-contract"; + license = licenses.gpl3Plus; + maintainers = teams.pantheon.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/pantheon/desktop/extra-elementary-contracts/exec-path.patch b/pkgs/desktops/pantheon/desktop/file-roller-contract/exec-path.patch similarity index 69% rename from pkgs/desktops/pantheon/desktop/extra-elementary-contracts/exec-path.patch rename to pkgs/desktops/pantheon/desktop/file-roller-contract/exec-path.patch index 3b97e306119d..8349ae8088da 100644 --- a/pkgs/desktops/pantheon/desktop/extra-elementary-contracts/exec-path.patch +++ b/pkgs/desktops/pantheon/desktop/file-roller-contract/exec-path.patch @@ -1,19 +1,18 @@ -diff --git a/file-roller-compress.contract b/file-roller-compress.contract -index 8de5396..de7e939 100644 ---- a/file-roller-compress.contract -+++ b/file-roller-compress.contract -@@ -3,6 +3,6 @@ Name=Compress +diff --git a/io.elementary.contractor.file-roller-compress.contract b/io.elementary.contractor.file-roller-compress.contract +index 11e4da3..d58549f 100644 +--- a/io.elementary.contractor.file-roller-compress.contract ++++ b/io.elementary.contractor.file-roller-compress.contract +@@ -3,5 +3,5 @@ Name=Compress Icon=add-files-to-archive Description=Create a compressed archive with the selected objects MimeType=!archive;inode/blockdevice;inode/chardevice;inode/fifo;inode/socket; -Exec=file-roller --add %U +Exec=@file_roller@/bin/file-roller --add %U Gettext-Domain=file-roller - -diff --git a/file-roller-extract-here.contract b/file-roller-extract-here.contract +diff --git a/io.elementary.contractor.file-roller-extract-here.contract b/io.elementary.contractor.file-roller-extract-here.contract index 184a6f2..345f4e7 100644 ---- a/file-roller-extract-here.contract -+++ b/file-roller-extract-here.contract +--- a/io.elementary.contractor.file-roller-extract-here.contract ++++ b/io.elementary.contractor.file-roller-extract-here.contract @@ -3,5 +3,5 @@ Name=Extract Here Icon=extract-archive Description=Extract the contents of the archives in the archive folder and quit the program @@ -21,14 +20,3 @@ index 184a6f2..345f4e7 100644 -Exec=file-roller --extract-here %U +Exec=@file_roller@/bin/file-roller --extract-here %U Gettext-Domain=file-roller -diff --git a/gnome-bluetooth.contract b/gnome-bluetooth.contract -index 745dbbe..8cc0102 100644 ---- a/gnome-bluetooth.contract -+++ b/gnome-bluetooth.contract -@@ -3,5 +3,5 @@ Name=Send files via Bluetooth - Icon=bluetooth - Description=Send files to device... - MimeType=!inode; --Exec=bluetooth-sendto %F -+Exec=@gnome_bluetooth@/bin/bluetooth-sendto %F - Gettext-Domain=gnome-bluetooth2 diff --git a/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix new file mode 100644 index 000000000000..36f4d3e539f0 --- /dev/null +++ b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchFromGitHub +, substituteAll +, gnome-bluetooth +}: + +stdenv.mkDerivation rec { + pname = "gnome-bluetooth-contract"; + version = "unstable-2021-02-23"; + + src = fetchFromGitHub { + owner = "elementary"; + repo = pname; + rev = "8dcd4d03dc7a7d487980fd8bc95af985dc4fff5c"; + sha256 = "sha256-9eX6j/cvN/CoqrHrh9mZEsUJ8viDWIGxIva1xFwIK7c="; + }; + + patches = [ + (substituteAll { + src = ./exec-path.patch; + gnome_bluetooth = gnome-bluetooth; + }) + ]; + + dontConfigure = true; + + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/contractor + cp *.contract $out/share/contractor/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Contractor extension for GNOME Bluetooth"; + homepage = "https://github.com/elementary/gnome-bluetooth-contract"; + license = licenses.gpl3Plus; + maintainers = teams.pantheon.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/exec-path.patch b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/exec-path.patch new file mode 100644 index 000000000000..c0bd9e579f46 --- /dev/null +++ b/pkgs/desktops/pantheon/desktop/gnome-bluetooth-contract/exec-path.patch @@ -0,0 +1,11 @@ +diff --git a/io.elementary.contracter.gnome-bluetooth.contract b/io.elementary.contracter.gnome-bluetooth.contract +index 3eb2334..ce0e5f5 100644 +--- a/io.elementary.contracter.gnome-bluetooth.contract ++++ b/io.elementary.contracter.gnome-bluetooth.contract +@@ -3,5 +3,5 @@ Name=Send Files via Bluetooth + Icon=bluetooth + Description=Send files to device... + MimeType=!inode; +-Exec=bluetooth-sendto %F ++Exec=@gnome_bluetooth@/bin/bluetooth-sendto %F + Gettext-Domain=gnome-bluetooth2