qmplay2: detach sources acquisition to sources.nix

Because it uses fetchSubmodules, and maybe in the future it will
become discouraged.
This commit is contained in:
Anderson Torres 2024-06-19 12:50:40 -03:00
parent 8d69d77244
commit 02dfdf731e
2 changed files with 26 additions and 11 deletions

View File

@ -1,8 +1,8 @@
{
lib,
alsa-lib,
callPackage,
cmake,
fetchFromGitHub,
ffmpeg,
fribidi,
game-music-emu,
@ -23,17 +23,11 @@
vulkan-tools,
}:
let
sources = callPackage ./sources.nix { };
in
stdenv.mkDerivation (finalAttrs: {
pname = "qmplay2";
version = "24.04.07";
src = fetchFromGitHub {
owner = "zaps166";
repo = "QMPlay2";
rev = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-WIDGApvl+aaB3Vdv0sHY+FHWqzreWWd3/xOLV11YfxM=";
};
inherit (sources.qmplay2) pname version src;
nativeBuildInputs = [
cmake

View File

@ -0,0 +1,21 @@
{
fetchFromGitHub,
}:
{
qmplay2 = let
self = {
pname = "qmplay2";
version = "24.04.07";
src = fetchFromGitHub {
owner = "zaps166";
repo = "QMPlay2";
rev = self.version;
fetchSubmodules = true;
hash = "sha256-WIDGApvl+aaB3Vdv0sHY+FHWqzreWWd3/xOLV11YfxM=";
};
};
in
self;
}