diff options
author | Atemu <atemu.main@gmail.com> | 2021-08-29 10:08:55 +0200 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2021-08-29 10:08:55 +0200 |
commit | e8d2c73f6e8e970a9fd8b0ca9aa610a486eea343 (patch) | |
tree | c31fb3e2ab0be2f230059efec1d2a199c70fe009 /pkgs/games/anki | |
parent | 21c937f8cb1e6adcfeb36dfd6c90d9d9bfab1d28 (diff) |
anki-bin: passthru sources
It wasn't possible to access the actual source on linux or that of the other OS
Diffstat (limited to 'pkgs/games/anki')
-rw-r--r-- | pkgs/games/anki/bin.nix | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/pkgs/games/anki/bin.nix b/pkgs/games/anki/bin.nix index a3867c9390d6b..089f141f76644 100644 --- a/pkgs/games/anki/bin.nix +++ b/pkgs/games/anki/bin.nix @@ -5,13 +5,21 @@ let # Update hashes for both Linux and Darwin! version = "2.1.46"; - unpacked = stdenv.mkDerivation { - inherit pname version; - - src = fetchurl { + sources = { + linux = fetchurl { url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2"; sha256 = "1jzpf42fqhfbjr95k7bpsnf34sfinamp6v828y0sapa4gzfvwkkz"; }; + darwin = fetchurl { + url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg"; + sha256 = "003cmh5qdj5mkrpm51n0is872faj99dqfkaaxyyrn6x03s36l17y"; + }; + }; + + unpacked = stdenv.mkDerivation { + inherit pname version; + + src = sources.linux; installPhase = '' runHook preInstall @@ -32,6 +40,8 @@ let platforms = [ "x86_64-linux" "x86_64-darwin" ]; maintainers = with maintainers; [ atemu ]; }; + + passthru = { inherit sources; }; in if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { @@ -51,14 +61,11 @@ if stdenv.isLinux then buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // { $out/share/ ''; - inherit meta; + inherit meta passthru; }) else stdenv.mkDerivation { - inherit pname version; + inherit pname version passthru; - src = fetchurl { - url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-mac.dmg"; - sha256 = "003cmh5qdj5mkrpm51n0is872faj99dqfkaaxyyrn6x03s36l17y"; - }; + src = sources.darwin; nativeBuildInputs = [ undmg ]; sourceRoot = "."; |