mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 12:11:28 +00:00
anki-bin: init at 2.1.36
Works around https://github.com/NixOS/nixpkgs/issues/78449 Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
This commit is contained in:
parent
83cbad92d7
commit
18906f453e
44
pkgs/games/anki/bin.nix
Normal file
44
pkgs/games/anki/bin.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ fetchurl, stdenv, lib, buildFHSUserEnv, appimageTools, writeShellScript, anki }:
|
||||
|
||||
let
|
||||
pname = "anki-bin";
|
||||
version = "2.1.36";
|
||||
|
||||
unpacked = stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ankitects/anki/releases/download/${version}/anki-${version}-linux.tar.bz2";
|
||||
sha256 = "01xcjnfs5pfh7v0nkffw2wpl19l6pj9k3kxrcawv3cm42asy0mfz";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
xdg-mime () {
|
||||
echo Stubbed!
|
||||
}
|
||||
export -f xdg-mime
|
||||
|
||||
PREFIX=$out bash install.sh
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
inherit (anki.meta) license homepage description longDescription;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ atemu ];
|
||||
};
|
||||
in
|
||||
|
||||
buildFHSUserEnv (appimageTools.defaultFhsEnvArgs // {
|
||||
name = "anki";
|
||||
|
||||
runScript = writeShellScript "anki-wrapper.sh" ''
|
||||
exec ${unpacked}/bin/anki
|
||||
'';
|
||||
|
||||
inherit meta;
|
||||
})
|
|
@ -25350,6 +25350,7 @@ in
|
|||
anki = python3Packages.callPackage ../games/anki {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
};
|
||||
anki-bin = callPackage ../games/anki/bin.nix { buildFHSUserEnv = buildFHSUserEnvBubblewrap; };
|
||||
|
||||
armagetronad = callPackage ../games/armagetronad { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue