diff options
author | Jan Malakhovski <oxij@oxij.org> | 2023-07-25 13:29:10 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2023-08-03 16:32:05 +0000 |
commit | d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e (patch) | |
tree | 4b43651951b37879c428be6159cdb2fa5e824c67 /pkgs/games/koboredux | |
parent | 5852f26bdcdca4a33b37d1631cfb3897bcc36fcc (diff) |
treewide: noop: refer to `src.name` or similar in `sourceRoot` where appropriate, part 2: the non-trivial cases
Diffstat (limited to 'pkgs/games/koboredux')
-rw-r--r-- | pkgs/games/koboredux/default.nix | 61 |
1 files changed, 34 insertions, 27 deletions
diff --git a/pkgs/games/koboredux/default.nix b/pkgs/games/koboredux/default.nix index 622dd2de50e3c..91981fc85fba0 100644 --- a/pkgs/games/koboredux/default.nix +++ b/pkgs/games/koboredux/default.nix @@ -11,36 +11,43 @@ }: with lib; -stdenv.mkDerivation rec { + +let pname = "koboredux"; version = "0.7.5.1"; - src = - [(fetchFromGitHub { - owner = "olofson"; - repo = "koboredux"; - rev = "v${version}"; - 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 - and re-run the installation: - - nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2 - - Alternatively, install the "koboredux-free" package, which replaces the - proprietary assets with a placeholder theme. - ''; - })); - - sourceRoot = "source"; # needed when we have the assets source + main_src = fetchFromGitHub { + owner = "olofson"; + repo = pname; + rev = "v${version}"; + sha256 = "09h9r65z8bar2z89s09j6px0gdq355kjf38rmd85xb2aqwnm6xig"; + }; + + assets_src = 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 + and re-run the installation: + + nix-prefetch-url file://\$PWD/koboredux-${version}-Linux.tar.bz2 + + 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 patches = [(fetchpatch { |