diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-20 12:16:56 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-20 12:16:56 +0100 |
commit | b24d64b3b1ef897f07cd072a88a9881cb330aa7f (patch) | |
tree | a87bb2eed9af3ef1efd51dd65221d91f0c949041 /nixpkgs/pkgs/applications/emulators/retroarch/cores.nix | |
parent | 73338df7473bb3810e70a16b8b0cba4f0f606f2b (diff) | |
parent | fa15b53dbea5028db38d6e09b4cef6eba42aeebb (diff) | |
download | nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.gz nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.bz2 nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.lz nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.xz nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.tar.zst nixlib-b24d64b3b1ef897f07cd072a88a9881cb330aa7f.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/applications/emulators/retroarch/cores.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/emulators/retroarch/cores.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/applications/emulators/retroarch/cores.nix b/nixpkgs/pkgs/applications/emulators/retroarch/cores.nix index 5f0585401235..c981f07114ab 100644 --- a/nixpkgs/pkgs/applications/emulators/retroarch/cores.nix +++ b/nixpkgs/pkgs/applications/emulators/retroarch/cores.nix @@ -48,13 +48,15 @@ let getCore = repo: (lib.getAttr repo hashesFile); getCoreSrc = repo: - (lib.pipe repo [ - getCore - (x: builtins.removeAttrs x [ "date" ]) - fetchFromGitHub - ]); + let + inherit (getCore repo) src fetcher; + fetcherFn = { + inherit fetchFromGitHub; + }.${fetcher} or (throw "Unknown fetcher: ${fetcher}"); + in + fetcherFn src; - getCoreDate = repo: (getCore repo).date or "unstable-1970-01-01"; + getCoreVersion = repo: (getCore repo).version; mkLibretroCore = # Sometimes core name != repo name, so you may need to set them differently @@ -67,7 +69,7 @@ let { core , repo ? core , src ? (getCoreSrc repo) - , version ? (getCoreDate repo) + , version ? (getCoreVersion repo) , ... }@args: import ./mkLibretroCore.nix ({ |