about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJan Malakhovski <oxij@oxij.org>2023-07-25 13:29:10 +0000
committerJan Malakhovski <oxij@oxij.org>2023-08-03 16:32:05 +0000
commitd8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e (patch)
tree4b43651951b37879c428be6159cdb2fa5e824c67 /pkgs/applications
parent5852f26bdcdca4a33b37d1631cfb3897bcc36fcc (diff)
treewide: noop: refer to `src.name` or similar in `sourceRoot` where appropriate, part 2: the non-trivial cases
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/johnny-reborn/with-data.nix40
-rw-r--r--pkgs/applications/version-management/gitqlient/default.nix80
2 files changed, 61 insertions, 59 deletions
diff --git a/pkgs/applications/misc/johnny-reborn/with-data.nix b/pkgs/applications/misc/johnny-reborn/with-data.nix
index 1e53edaa5b85a..04300524665e8 100644
--- a/pkgs/applications/misc/johnny-reborn/with-data.nix
+++ b/pkgs/applications/misc/johnny-reborn/with-data.nix
@@ -6,34 +6,32 @@
 , makeWrapper
 }:
 
+
+let
+  sounds = fetchFromGitHub {
+    owner = "nivs1978";
+    repo = "Johnny-Castaway-Open-Source";
+    rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
+    hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
+  };
+
+  resources = fetchzip {
+    name = "scrantic-source";
+    url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip";
+    hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4=";
+    stripRoot = false;
+  };
+in
+
 stdenvNoCC.mkDerivation {
   pname = "johnny-reborn";
   inherit (johnny-reborn-engine) version;
 
-  srcs =
-    let
-      sounds = fetchFromGitHub {
-        owner = "nivs1978";
-        repo = "Johnny-Castaway-Open-Source";
-        rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558";
-        hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY=";
-      };
-
-      resources = fetchzip {
-        name = "scrantic-source";
-        url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip";
-        hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4=";
-        stripRoot = false;
-      };
-    in
-    [
-      sounds
-      resources
-    ];
+  srcs = [ sounds resources ];
 
   nativeBuildInputs = [ makeWrapper ];
 
-  sourceRoot = "source";
+  sourceRoot = sounds.name;
 
   dontConfigure = true;
   dontBuild = true;
diff --git a/pkgs/applications/version-management/gitqlient/default.nix b/pkgs/applications/version-management/gitqlient/default.nix
index a1c4ec5c69495..622c0f045135b 100644
--- a/pkgs/applications/version-management/gitqlient/default.nix
+++ b/pkgs/applications/version-management/gitqlient/default.nix
@@ -6,48 +6,52 @@
 , gitUpdater
 }:
 
-mkDerivation rec {
+let
   pname = "gitqlient";
   version = "1.5.0";
 
-  srcs = [
-    (fetchFromGitHub {
-      owner = "francescmm";
-      repo = pname;
-      rev = "v${version}";
-      sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw=";
-    })
-    (fetchFromGitHub rec {
-      owner = "francescmm";
-      repo = "AuxiliarCustomWidgets";
-      rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1";
-      sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA=";
-      name = repo;
-    })
-    (fetchFromGitHub rec {
-      owner = "francescmm";
-      repo = "QLogger";
-      rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f";
-      sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4=";
-      name = repo;
-    })
-    (fetchFromGitHub rec {
-      owner = "francescmm";
-      repo = "QPinnableTabWidget";
-      rev = "cc937794e910d0452f0c07b4961c6014a7358831";
-      sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE=";
-      name = repo;
-    })
-    (fetchFromGitHub rec {
-      owner = "francescmm";
-      repo = "git";
-      rev = "b62750f4da4b133faff49e6f53950d659b18c948";
-      sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs=";
-      name = repo;
-    })
-  ];
+  main_src = fetchFromGitHub {
+    owner = "francescmm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw=";
+  };
+  aux_src = fetchFromGitHub rec {
+    owner = "francescmm";
+    repo = "AuxiliarCustomWidgets";
+    rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1";
+    sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA=";
+    name = repo;
+  };
+  qlogger_src = fetchFromGitHub rec {
+    owner = "francescmm";
+    repo = "QLogger";
+    rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f";
+    sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4=";
+    name = repo;
+  };
+  qpinnabletab_src = fetchFromGitHub rec {
+    owner = "francescmm";
+    repo = "QPinnableTabWidget";
+    rev = "cc937794e910d0452f0c07b4961c6014a7358831";
+    sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE=";
+    name = repo;
+  };
+  git_src = fetchFromGitHub rec {
+    owner = "francescmm";
+    repo = "git";
+    rev = "b62750f4da4b133faff49e6f53950d659b18c948";
+    sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs=";
+    name = repo;
+  };
+in
+
+mkDerivation rec {
+  inherit pname version;
+
+  srcs = [ main_src aux_src qlogger_src qpinnabletab_src git_src ];
 
-  sourceRoot = "source";
+  sourceRoot = main_src.name;
 
   nativeBuildInputs = [
     qmake