From 976de01d446de011e90b1938ad2cafe86196eb80 Mon Sep 17 00:00:00 2001 From: yuu Date: Thu, 10 Mar 2022 12:15:04 -0300 Subject: [PATCH] nix-tour: refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sandro Jäckel --- pkgs/applications/misc/nix-tour/default.nix | 31 +++++++++++---------- wklkl | 3 ++ 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 wklkl diff --git a/pkgs/applications/misc/nix-tour/default.nix b/pkgs/applications/misc/nix-tour/default.nix index 7eed625f1e90..ac10d3eece35 100644 --- a/pkgs/applications/misc/nix-tour/default.nix +++ b/pkgs/applications/misc/nix-tour/default.nix @@ -1,35 +1,36 @@ -{ lib, stdenv, fetchFromGitHub, electron, runtimeShell } : +{ lib +, stdenv +, fetchFromGitHub +, electron +, runtimeShell +, makeWrapper +}: stdenv.mkDerivation rec { pname = "nix-tour"; version = "0.0.1"; - buildInputs = [ electron ]; - src = fetchFromGitHub { owner = "nixcloud"; repo = "tour_of_nix"; rev = "v${version}"; - sha256 = "sha256-a/P2ZMc9OpM4PxRFklSO6oVCc96AGWkxtGF/EmnfYSU="; + sha256 = "09b1vxli4zv1nhqnj6c0vrrl51gaira94i8l7ww96fixqxjgdwvb"; }; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ electron ]; + installPhase = '' - mkdir -p $out/bin - mkdir -p $out/share - cp -R * $out/share - chmod 0755 $out/share/ -R - echo "#!${runtimeShell}" > $out/bin/nix-tour - echo "cd $out/share/" >> $out/bin/nix-tour - echo "${electron}/bin/electron $out/share/electron-main.js" >> $out/bin/nix-tour - chmod 0755 $out/bin/nix-tour + install -d $out/bin $out/share/nix-tour + cp -R * $out/share/nix-tour + makeWrapper ${electron}/bin/electron $out/bin/nix-tour \ + --add-flags $out/share/nix-tour/electron-main.js ''; meta = with lib; { description = "'the tour of nix' from nixcloud.io/tour as offline version"; homepage = "https://nixcloud.io/tour"; license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ qknight ]; + maintainers = with maintainers; [ qknight yuu ]; }; - } diff --git a/wklkl b/wklkl new file mode 100644 index 000000000000..98e2b03a5204 --- /dev/null +++ b/wklkl @@ -0,0 +1,3 @@ +review 165492 + +gnome3.eog gnome3.gnome-disk-utility lsd qbittorrent ripgrep sway