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

This commit is contained in:
Jan Malakhovski 2023-07-25 13:29:10 +00:00
parent 5852f26bdc
commit d8f7f6a5ce
6 changed files with 133 additions and 119 deletions

View file

@ -6,34 +6,32 @@
, makeWrapper , 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 { stdenvNoCC.mkDerivation {
pname = "johnny-reborn"; pname = "johnny-reborn";
inherit (johnny-reborn-engine) version; inherit (johnny-reborn-engine) version;
srcs = srcs = [ sounds resources ];
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
];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
sourceRoot = "source"; sourceRoot = sounds.name;
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;

View file

@ -6,48 +6,52 @@
, gitUpdater , gitUpdater
}: }:
mkDerivation rec { let
pname = "gitqlient"; pname = "gitqlient";
version = "1.5.0"; version = "1.5.0";
srcs = [ main_src = fetchFromGitHub {
(fetchFromGitHub { owner = "francescmm";
owner = "francescmm"; repo = pname;
repo = pname; rev = "v${version}";
rev = "v${version}"; sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw=";
sha256 = "sha256-Mq29HbmPABrRIJjWC5AAKIOKbGngeJdkZkWeJw8BFuw="; };
}) aux_src = fetchFromGitHub rec {
(fetchFromGitHub rec { owner = "francescmm";
owner = "francescmm"; repo = "AuxiliarCustomWidgets";
repo = "AuxiliarCustomWidgets"; rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1";
rev = "835f538b4a79e4d6bb70eef37a32103e7b2a1fd1"; sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA=";
sha256 = "sha256-b1gb/7UcLS6lI92dBfTenGXA064t4dZufs3S9lu/lQA="; name = repo;
name = repo; };
}) qlogger_src = fetchFromGitHub rec {
(fetchFromGitHub rec { owner = "francescmm";
owner = "francescmm"; repo = "QLogger";
repo = "QLogger"; rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f";
rev = "d1ed24e080521a239d5d5e2c2347fe211f0f3e4f"; sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4=";
sha256 = "sha256-NVlFYmm7IIkf8LhQrAYXil9kH6DFq1XjOEHQiIWmER4="; name = repo;
name = repo; };
}) qpinnabletab_src = fetchFromGitHub rec {
(fetchFromGitHub rec { owner = "francescmm";
owner = "francescmm"; repo = "QPinnableTabWidget";
repo = "QPinnableTabWidget"; rev = "cc937794e910d0452f0c07b4961c6014a7358831";
rev = "cc937794e910d0452f0c07b4961c6014a7358831"; sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE=";
sha256 = "sha256-2KzzBv/s2t665axeBxWrn8aCMQQArQLlUBOAlVhU+wE="; name = repo;
name = repo; };
}) git_src = fetchFromGitHub rec {
(fetchFromGitHub rec { owner = "francescmm";
owner = "francescmm"; repo = "git";
repo = "git"; rev = "b62750f4da4b133faff49e6f53950d659b18c948";
rev = "b62750f4da4b133faff49e6f53950d659b18c948"; sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs=";
sha256 = "sha256-4FqA+kkHd0TqD6ZuB4CbJ+IhOtQG9uWN+qhSAT0dXGs="; name = repo;
name = repo; };
}) in
];
sourceRoot = "source"; mkDerivation rec {
inherit pname version;
srcs = [ main_src aux_src qlogger_src qpinnabletab_src git_src ];
sourceRoot = main_src.name;
nativeBuildInputs = [ nativeBuildInputs = [
qmake qmake

View file

@ -21,8 +21,27 @@
}: }:
let let
pname = "mojave-gtk-theme"; pname = "mojave-gtk-theme";
version = "2023-06-13";
main_src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
hash = "sha256-0jb/VQ6Z0BGaEka57BWM0pBweP08cr4jfPRdEN/BJ1M=";
};
wallpapers_src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = "0c4ae6ddff7e3fab4959469461c4d4042deb1b2f";
hash = "sha256-7LSZSsRt6zTVPLWzuBgwRC1q1MHp5pN/pMl3x2wR8Ow=";
name = "wallpapers";
};
in in
lib.checkListOfEnum "${pname}: button size variants" [ "standard" "small" ] buttonSizeVariants lib.checkListOfEnum "${pname}: button size variants" [ "standard" "small" ] buttonSizeVariants
lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants
lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants lib.checkListOfEnum "${pname}: color variants" [ "light" "dark" ] colorVariants
@ -30,29 +49,11 @@ lib.checkListOfEnum "${pname}: opacity variants" [ "standard" "solid" ] opacityV
lib.checkListOfEnum "${pname}: theme variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants lib.checkListOfEnum "${pname}: theme variants" [ "default" "blue" "purple" "pink" "red" "orange" "yellow" "green" "grey" "all" ] themeVariants
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
inherit pname; inherit pname version;
version = "2023-06-13";
srcs = [ srcs = [ main_src ] ++ lib.optional wallpapers wallpapers_src;
(fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
hash = "sha256-0jb/VQ6Z0BGaEka57BWM0pBweP08cr4jfPRdEN/BJ1M=";
})
]
++
lib.optional wallpapers
(fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = "0c4ae6ddff7e3fab4959469461c4d4042deb1b2f";
hash = "sha256-7LSZSsRt6zTVPLWzuBgwRC1q1MHp5pN/pMl3x2wR8Ow=";
name = "wallpapers";
})
;
sourceRoot = "source"; sourceRoot = main_src.name;
nativeBuildInputs = [ nativeBuildInputs = [
glib glib

View file

@ -18,7 +18,7 @@ let
setTensorflowSourceRoot = dir: drv: setTensorflowSourceRoot = dir: drv:
(overrideCabal (drv: { src = tensorflow-haskell; }) drv) (overrideCabal (drv: { src = tensorflow-haskell; }) drv)
.overrideAttrs (_oldAttrs: {sourceRoot = "source/${dir}";}); .overrideAttrs (_oldAttrs: { sourceRoot = "${tensorflow-haskell.name}/${dir}"; });
in in
{ {
tensorflow-proto = doJailbreak (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto); tensorflow-proto = doJailbreak (setTensorflowSourceRoot "tensorflow-proto" super.tensorflow-proto);

View file

@ -6,24 +6,28 @@
, enableDefaultMusicPack ? true , enableDefaultMusicPack ? true
}: }:
python3.pkgs.buildPythonApplication rec { let
pname = "endgame-singularity"; pname = "endgame-singularity";
version = "1.00"; version = "1.00";
srcs = [ main_src = fetchFromGitHub {
(fetchFromGitHub { owner = "singularity";
owner = "singularity"; repo = "singularity";
repo = "singularity"; rev = "v${version}";
rev = "v${version}"; sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl";
sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl"; };
})
] ++ lib.optional enableDefaultMusicPack ( music_src = fetchurl {
fetchurl { url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip";
url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip"; sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb";
sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb"; };
} in
);
sourceRoot = "source"; python3.pkgs.buildPythonApplication rec {
inherit pname version;
srcs = [ main_src ] ++ lib.optional enableDefaultMusicPack music_src;
sourceRoot = main_src.name;
nativeBuildInputs = [ unzip ]; # The music is zipped nativeBuildInputs = [ unzip ]; # The music is zipped
propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ]; propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];

View file

@ -11,36 +11,43 @@
}: }:
with lib; with lib;
stdenv.mkDerivation rec {
let
pname = "koboredux"; pname = "koboredux";
version = "0.7.5.1"; version = "0.7.5.1";
src = main_src = fetchFromGitHub {
[(fetchFromGitHub { owner = "olofson";
owner = "olofson"; repo = pname;
repo = "koboredux"; rev = "v${version}";
rev = "v${version}"; sha256 = "09h9r65z8bar2z89s09j6px0gdq355kjf38rmd85xb2aqwnm6xig";
sha256 = "09h9r65z8bar2z89s09j6px0gdq355kjf38rmd85xb2aqwnm6xig"; };
})]
++
(optional useProprietaryAssets (requireFile {
name = "koboredux-${version}-Linux.tar.bz2";
sha256 = "11bmicx9i11m4c3dp19jsql0zy4rjf5a28x4hd2wl8h3bf8cdgav";
message = ''
Please purchase the game on https://olofson.itch.io/kobo-redux
and download the Linux build.
Once you have downloaded the file, please use the following command assets_src = requireFile {
and re-run the installation: name = "koboredux-${version}-Linux.tar.bz2";
sha256 = "11bmicx9i11m4c3dp19jsql0zy4rjf5a28x4hd2wl8h3bf8cdgav";
message = ''
Please purchase the game on https://olofson.itch.io/kobo-redux
and download the Linux build.
nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2 Once you have downloaded the file, please use the following command
and re-run the installation:
Alternatively, install the "koboredux-free" package, which replaces the nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2
proprietary assets with a placeholder theme.
'';
}));
sourceRoot = "source"; # needed when we have the assets source Alternatively, install the "koboredux-free" package, which replaces the
proprietary assets with a placeholder theme.
'';
};
in
stdenv.mkDerivation rec {
inherit pname version;
src = [ main_src ] ++ optional useProprietaryAssets assets_src;
sourceRoot = main_src.name;
# Fix clang build # Fix clang build
patches = [(fetchpatch { patches = [(fetchpatch {