treewide: noop: refer to `src.name` or similar in `sourceRoot` where appropriate, part 2: the non-trivial cases

+133 -119
+19 -21
pkgs/applications/misc/johnny-reborn/with-data.nix
··· 6 , makeWrapper 7 }: 8 9 stdenvNoCC.mkDerivation { 10 pname = "johnny-reborn"; 11 inherit (johnny-reborn-engine) version; 12 13 - srcs = 14 - let 15 - sounds = fetchFromGitHub { 16 - owner = "nivs1978"; 17 - repo = "Johnny-Castaway-Open-Source"; 18 - rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558"; 19 - hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY="; 20 - }; 21 - 22 - resources = fetchzip { 23 - name = "scrantic-source"; 24 - url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip"; 25 - hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4="; 26 - stripRoot = false; 27 - }; 28 - in 29 - [ 30 - sounds 31 - resources 32 - ]; 33 34 nativeBuildInputs = [ makeWrapper ]; 35 36 - sourceRoot = "source"; 37 38 dontConfigure = true; 39 dontBuild = true;
··· 6 , makeWrapper 7 }: 8 9 + 10 + let 11 + sounds = fetchFromGitHub { 12 + owner = "nivs1978"; 13 + repo = "Johnny-Castaway-Open-Source"; 14 + rev = "be6afefd43a3334acc66fc9d777c162c8bfb9558"; 15 + hash = "sha256-rtZVCn4KbEBVwaSQ4HZhMoDEI5Q9IPj9SZywgAx0MPY="; 16 + }; 17 + 18 + resources = fetchzip { 19 + name = "scrantic-source"; 20 + url = "https://archive.org/download/johnny-castaway-screensaver/scrantic-run.zip"; 21 + hash = "sha256-Q9chCYReOQEmkTyIkYo+D+OXYUqxPNOOEEmiFh8yaw4="; 22 + stripRoot = false; 23 + }; 24 + in 25 + 26 stdenvNoCC.mkDerivation { 27 pname = "johnny-reborn"; 28 inherit (johnny-reborn-engine) version; 29 30 + srcs = [ sounds resources ]; 31 32 nativeBuildInputs = [ makeWrapper ]; 33 34 + sourceRoot = sounds.name; 35 36 dontConfigure = true; 37 dontBuild = true;
+42 -38
pkgs/applications/version-management/gitqlient/default.nix
··· 6 , gitUpdater 7 }: 8 9 - mkDerivation rec { 10 pname = "gitqlient"; 11 version = "1.5.0"; 12 13 - srcs = [ 14 - (fetchFromGitHub { 15 - owner = "francescmm"; 16 - repo = pname; 17 - rev = "v${version}"; 18 - sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw="; 19 - }) 20 - (fetchFromGitHub rec { 21 - owner = "francescmm"; 22 - repo = "AuxiliarCustomWidgets"; 23 - rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1"; 24 - sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA="; 25 - name = repo; 26 - }) 27 - (fetchFromGitHub rec { 28 - owner = "francescmm"; 29 - repo = "QLogger"; 30 - rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f"; 31 - sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4="; 32 - name = repo; 33 - }) 34 - (fetchFromGitHub rec { 35 - owner = "francescmm"; 36 - repo = "QPinnableTabWidget"; 37 - rev = "cc937794e910d0452f0c07b4961c6014a7358831"; 38 - sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE="; 39 - name = repo; 40 - }) 41 - (fetchFromGitHub rec { 42 - owner = "francescmm"; 43 - repo = "git"; 44 - rev = "b62750f4da4b133faff49e6f53950d659b18c948"; 45 - sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs="; 46 - name = repo; 47 - }) 48 - ]; 49 50 - sourceRoot = "source"; 51 52 nativeBuildInputs = [ 53 qmake
··· 6 , gitUpdater 7 }: 8 9 + let 10 pname = "gitqlient"; 11 version = "1.5.0"; 12 13 + main_src = fetchFromGitHub { 14 + owner = "francescmm"; 15 + repo = pname; 16 + rev = "v${version}"; 17 + sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw="; 18 + }; 19 + aux_src = fetchFromGitHub rec { 20 + owner = "francescmm"; 21 + repo = "AuxiliarCustomWidgets"; 22 + rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1"; 23 + sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA="; 24 + name = repo; 25 + }; 26 + qlogger_src = fetchFromGitHub rec { 27 + owner = "francescmm"; 28 + repo = "QLogger"; 29 + rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f"; 30 + sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4="; 31 + name = repo; 32 + }; 33 + qpinnabletab_src = fetchFromGitHub rec { 34 + owner = "francescmm"; 35 + repo = "QPinnableTabWidget"; 36 + rev = "cc937794e910d0452f0c07b4961c6014a7358831"; 37 + sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE="; 38 + name = repo; 39 + }; 40 + git_src = fetchFromGitHub rec { 41 + owner = "francescmm"; 42 + repo = "git"; 43 + rev = "b62750f4da4b133faff49e6f53950d659b18c948"; 44 + sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs="; 45 + name = repo; 46 + }; 47 + in 48 49 + mkDerivation rec { 50 + inherit pname version; 51 + 52 + srcs = [ main_src aux_src qlogger_src qpinnabletab_src git_src ]; 53 + 54 + sourceRoot = main_src.name; 55 56 nativeBuildInputs = [ 57 qmake
+22 -21
pkgs/data/themes/mojave/default.nix
··· 21 }: 22 23 let 24 pname = "mojave-gtk-theme"; 25 in 26 lib.checkListOfEnum "${pname}: button size variants" [ "standard" "small" ] buttonSizeVariants 27 lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants 28 lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants ··· 30 lib.checkListOfEnum "${pname}: theme variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants 31 32 stdenvNoCC.mkDerivation rec { 33 - inherit pname; 34 - version = "2023-06-13"; 35 36 - srcs = [ 37 - (fetchFromGitHub { 38 - owner = "vinceliuice"; 39 - repo = pname; 40 - rev = version; 41 - hash = "sha256-0jb/VQ6Z0BGaEka57BWM0pBweP08cr4jfPRdEN/BJ1M="; 42 - }) 43 - ] 44 - ++ 45 - lib.optional wallpapers 46 - (fetchFromGitHub { 47 - owner = "vinceliuice"; 48 - repo = pname; 49 - rev = "0c4ae6ddff7e3fab4959469461c4d4042deb1b2f"; 50 - hash = "sha256-7LSZSsRt6zTVPLWzuBgwRC1q1MHp5pN/pMl3x2wR8Ow="; 51 - name = "wallpapers"; 52 - }) 53 - ; 54 55 - sourceRoot = "source"; 56 57 nativeBuildInputs = [ 58 glib
··· 21 }: 22 23 let 24 + 25 pname = "mojave-gtk-theme"; 26 + version = "2023-06-13"; 27 + 28 + main_src = fetchFromGitHub { 29 + owner = "vinceliuice"; 30 + repo = pname; 31 + rev = version; 32 + hash = "sha256-0jb/VQ6Z0BGaEka57BWM0pBweP08cr4jfPRdEN/BJ1M="; 33 + }; 34 + 35 + wallpapers_src = fetchFromGitHub { 36 + owner = "vinceliuice"; 37 + repo = pname; 38 + rev = "0c4ae6ddff7e3fab4959469461c4d4042deb1b2f"; 39 + hash = "sha256-7LSZSsRt6zTVPLWzuBgwRC1q1MHp5pN/pMl3x2wR8Ow="; 40 + name = "wallpapers"; 41 + }; 42 + 43 in 44 + 45 lib.checkListOfEnum "${pname}: button size variants" [ "standard" "small" ] buttonSizeVariants 46 lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants 47 lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants ··· 49 lib.checkListOfEnum "${pname}: theme variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants 50 51 stdenvNoCC.mkDerivation rec { 52 + inherit pname version; 53 54 + srcs = [ main_src ] ++ lib.optional wallpapers wallpapers_src; 55 56 + sourceRoot = main_src.name; 57 58 nativeBuildInputs = [ 59 glib
+1 -1
pkgs/development/haskell-modules/configuration-tensorflow.nix
··· 18 19 setTensorflowSourceRoot = dir: drv: 20 (overrideCabal (drv: { src = tensorflow-haskell; }) drv) 21 - .overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";}); 22 in 23 { 24 tensorflow-proto = doJailbreak (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto);
··· 18 19 setTensorflowSourceRoot = dir: drv: 20 (overrideCabal (drv: { src = tensorflow-haskell; }) drv) 21 + .overrideAttrs (_oldAttrs: { sourceRoot = "${tensorflow-haskell.name}/${dir}"; }); 22 in 23 { 24 tensorflow-proto = doJailbreak (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto);
+19 -15
pkgs/games/endgame-singularity/default.nix
··· 6 , enableDefaultMusicPack ? true 7 }: 8 9 - python3.pkgs.buildPythonApplication rec { 10 pname = "endgame-singularity"; 11 version = "1.00"; 12 13 - srcs = [ 14 - (fetchFromGitHub { 15 - owner = "singularity"; 16 - repo = "singularity"; 17 - rev = "v${version}"; 18 - sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl"; 19 - }) 20 - ] ++ lib.optional enableDefaultMusicPack ( 21 - fetchurl { 22 - url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip"; 23 - sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb"; 24 - } 25 - ); 26 - sourceRoot = "source"; 27 28 nativeBuildInputs = [ unzip ]; # The music is zipped 29 propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];
··· 6 , enableDefaultMusicPack ? true 7 }: 8 9 + let 10 pname = "endgame-singularity"; 11 version = "1.00"; 12 13 + main_src = fetchFromGitHub { 14 + owner = "singularity"; 15 + repo = "singularity"; 16 + rev = "v${version}"; 17 + sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl"; 18 + }; 19 + 20 + music_src = fetchurl { 21 + url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip"; 22 + sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb"; 23 + }; 24 + in 25 + 26 + python3.pkgs.buildPythonApplication rec { 27 + inherit pname version; 28 + 29 + srcs = [ main_src ] ++ lib.optional enableDefaultMusicPack music_src; 30 + sourceRoot = main_src.name; 31 32 nativeBuildInputs = [ unzip ]; # The music is zipped 33 propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];
+30 -23
pkgs/games/koboredux/default.nix
··· 11 }: 12 13 with lib; 14 - stdenv.mkDerivation rec { 15 pname = "koboredux"; 16 version = "0.7.5.1"; 17 18 - src = 19 - [(fetchFromGitHub { 20 - owner = "olofson"; 21 - repo = "koboredux"; 22 - rev = "v${version}"; 23 - sha256 = "09h9r65z8bar2z89s09j6px0gdq355kjf38rmd85xb2aqwnm6xig"; 24 - })] 25 - ++ 26 - (optional useProprietaryAssets (requireFile { 27 - name = "koboredux-${version}-Linux.tar.bz2"; 28 - sha256 = "11bmicx9i11m4c3dp19jsql0zy4rjf5a28x4hd2wl8h3bf8cdgav"; 29 - message = '' 30 - Please purchase the game on https://olofson.itch.io/kobo-redux 31 - and download the Linux build. 32 33 - Once you have downloaded the file, please use the following command 34 - and re-run the installation: 35 36 - nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2 37 38 - Alternatively, install the "koboredux-free" package, which replaces the 39 - proprietary assets with a placeholder theme. 40 - ''; 41 - })); 42 43 - sourceRoot = "source"; # needed when we have the assets source 44 45 # Fix clang build 46 patches = [(fetchpatch {
··· 11 }: 12 13 with lib; 14 + 15 + let 16 pname = "koboredux"; 17 version = "0.7.5.1"; 18 19 + main_src = fetchFromGitHub { 20 + owner = "olofson"; 21 + repo = pname; 22 + rev = "v${version}"; 23 + sha256 = "09h9r65z8bar2z89s09j6px0gdq355kjf38rmd85xb2aqwnm6xig"; 24 + }; 25 + 26 + assets_src = requireFile { 27 + name = "koboredux-${version}-Linux.tar.bz2"; 28 + sha256 = "11bmicx9i11m4c3dp19jsql0zy4rjf5a28x4hd2wl8h3bf8cdgav"; 29 + message = '' 30 + Please purchase the game on https://olofson.itch.io/kobo-redux 31 + and download the Linux build. 32 + 33 + Once you have downloaded the file, please use the following command 34 + and re-run the installation: 35 + 36 + nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2 37 + 38 + Alternatively, install the "koboredux-free" package, which replaces the 39 + proprietary assets with a placeholder theme. 40 + ''; 41 + }; 42 43 + in 44 45 + stdenv.mkDerivation rec { 46 + inherit pname version; 47 48 + src = [ main_src ] ++ optional useProprietaryAssets assets_src; 49 50 + sourceRoot = main_src.name; 51 52 # Fix clang build 53 patches = [(fetchpatch {