From 86f4badc7d69fb1d7efd1b523e5102918ccf0a96 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 28 Feb 2019 18:47:30 -0500 Subject: [PATCH 1/2] pantheon.elementary-redacted-script: init at 2016-06-03 --- .../elementary-screenshot-tool/default.nix | 11 -------- .../redacted-script.nix | 28 ------------------- .../elementary-redacted-script/default.nix | 28 +++++++++++++++++++ pkgs/desktops/pantheon/default.nix | 2 ++ 4 files changed, 30 insertions(+), 39 deletions(-) delete mode 100644 pkgs/desktops/pantheon/apps/elementary-screenshot-tool/redacted-script.nix create mode 100644 pkgs/desktops/pantheon/artwork/elementary-redacted-script/default.nix diff --git a/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/default.nix b/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/default.nix index f1c07b8d3f56..2644d31d7983 100644 --- a/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/default.nix +++ b/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/default.nix @@ -2,12 +2,6 @@ , ninja, vala, python3, desktop-file-utils, gtk3, granite, libgee , libcanberra, gobject-introspection, elementary-icon-theme, wrapGAppsHook }: -let - - redacted-script = callPackage ./redacted-script.nix {}; - -in - stdenv.mkDerivation rec { pname = "screenshot-tool"; # This will be renamed to "screenshot" soon. See -> https://github.com/elementary/screenshot/pull/93 version = "1.6.2"; @@ -52,11 +46,6 @@ stdenv.mkDerivation rec { patchShebangs meson/post_install.py ''; - postInstall = '' - mkdir -p $out/share/fonts/truetype - cp -rva ${redacted-script}/share/fonts/truetype/redacted-elementary $out/share/fonts/truetype - ''; - meta = with stdenv.lib; { description = "Screenshot tool designed for elementary OS"; homepage = https://github.com/elementary/screenshot; diff --git a/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/redacted-script.nix b/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/redacted-script.nix deleted file mode 100644 index db1d9d240c40..000000000000 --- a/pkgs/desktops/pantheon/apps/elementary-screenshot-tool/redacted-script.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchFromGitHub, pantheon }: - -stdenv.mkDerivation rec { - name = "elementary-redacted-script-${version}"; - version = "5.1.0"; - - src = fetchFromGitHub { - owner = "elementary"; - repo = "fonts"; - rev = version; - sha256 = "16x2w7w29k4jx2nwc5932h9rqvb216vxsziazisv2rpll74kn8b2"; - }; - - dontConfigure = true; - - installPhase = '' - mkdir -p $out/share/fonts/truetype/redacted-elementary - cp -a redacted/*.ttf $out/share/fonts/truetype/redacted-elementary - ''; - - meta = with stdenv.lib; { - description = "Redacted Script Font for elementary"; - homepage = https://github.com/elementary/fonts; - license = licenses.ofl; - maintainers = pantheon.maintainers; - platforms = platforms.linux; - }; -} diff --git a/pkgs/desktops/pantheon/artwork/elementary-redacted-script/default.nix b/pkgs/desktops/pantheon/artwork/elementary-redacted-script/default.nix new file mode 100644 index 000000000000..061feb4b2d95 --- /dev/null +++ b/pkgs/desktops/pantheon/artwork/elementary-redacted-script/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, pantheon }: + +stdenv.mkDerivation rec { + pname = "elementary-redacted-script"; + version = "unstable-2016-06-03"; + + src = fetchFromGitHub { + owner = "png2378"; + repo = "redacted-elementary"; + rev = "346440ff9ce19465e6d5c3d6d67a8573f992c746"; + sha256 = "1jpd13sxkarclr0mlm66wzgpjh52ghzjzn4mywhyshyyskwn7jg1"; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/share/fonts/truetype/redacted-elementary + cp -a truetype/*.ttf $out/share/fonts/truetype/redacted-elementary + ''; + + meta = with stdenv.lib; { + description = "Font for concealing text"; + homepage = https://github.com/png2378/redacted-elementary; + license = licenses.ofl; + maintainers = pantheon.maintainers; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/pantheon/default.nix b/pkgs/desktops/pantheon/default.nix index 27e6e02a4a37..8271abc1506d 100644 --- a/pkgs/desktops/pantheon/default.nix +++ b/pkgs/desktops/pantheon/default.nix @@ -217,6 +217,8 @@ lib.makeScope pkgs.newScope (self: with self; { elementary-icon-theme = callPackage ./artwork/elementary-icon-theme { }; + elementary-redacted-script = callPackage ./artwork/elementary-redacted-script { }; + elementary-sound-theme = callPackage ./artwork/elementary-sound-theme { }; elementary-wallpapers = callPackage ./artwork/elementary-wallpapers { }; From 59f47088fb2bab57c6a8fef94eba52c4984a2f9a Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 28 Feb 2019 18:51:54 -0500 Subject: [PATCH 2/2] nixos/pantheon: add elementary-redacted-script to fonts Needed by elementary-screenshot-tool to conceal text. --- nixos/modules/services/x11/desktop-managers/pantheon.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index 0f49439bf7c8..1f5a8b18d790 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -184,6 +184,7 @@ in fonts.fonts = with pkgs; [ opensans-ttf roboto-mono + pantheon.elementary-redacted-script # needed by screenshot-tool ]; fonts.fontconfig.defaultFonts = { monospace = [ "Roboto Mono" ];