nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 84 lines 2.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 alsa-lib, 7 perl, 8 pkg-config, 9 SDL2, 10 libX11, 11 libXext, 12 utf8proc, 13 nix-update-script, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "schismtracker"; 18 version = "20251014"; 19 20 src = fetchFromGitHub { 21 owner = "schismtracker"; 22 repo = "schismtracker"; 23 tag = finalAttrs.version; 24 hash = "sha256-N1wCOR7Su3PllzrffkwB6LfhZlol1/4dVegySzJlH28="; 25 }; 26 27 # If we let it try to get the version from git, it will fail and fall back 28 # on running `date`, which will output the epoch, which is considered invalid 29 # in this assert: https://github.com/schismtracker/schismtracker/blob/a106b57e0f809b95d9e8bcf5a3975d27e0681b5a/schism/version.c#L112 30 postPatch = '' 31 substituteInPlace configure.ac \ 32 --replace-fail 'git log' 'echo ${finalAttrs.version} #' 33 ''; 34 35 configureFlags = [ 36 (lib.enableFeature true "dependency-tracking") 37 (lib.withFeature true "sdl2") 38 (lib.enableFeature true "sdl2-linking") 39 ] 40 ++ lib.optionals stdenv.hostPlatform.isLinux [ 41 (lib.enableFeature true "alsa") 42 (lib.enableFeature true "alsa-linking") 43 ] 44 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 45 (lib.enableFeature false "sdltest") 46 ]; 47 48 strictDeps = true; 49 50 nativeBuildInputs = [ 51 autoreconfHook 52 perl 53 pkg-config 54 ]; 55 56 buildInputs = [ 57 SDL2 58 libX11 59 utf8proc 60 ] 61 ++ lib.optionals stdenv.hostPlatform.isLinux [ 62 alsa-lib 63 libXext 64 ]; 65 66 enableParallelBuilding = true; 67 68 # Our Darwin SDL2 doesn't have a SDL2main to link against 69 preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' 70 substituteInPlace configure.ac \ 71 --replace '-lSDL2main' '-lSDL2' 72 ''; 73 74 passthru.updateScript = nix-update-script { }; 75 76 meta = { 77 description = "Music tracker application, free reimplementation of Impulse Tracker"; 78 homepage = "https://schismtracker.org/"; 79 license = lib.licenses.gpl2Plus; 80 platforms = lib.platforms.unix; 81 maintainers = with lib.maintainers; [ ftrvxmtrx ]; 82 mainProgram = "schismtracker"; 83 }; 84})