nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 97 lines 2.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 gitUpdater, 6 bencodetools, 7 flac, 8 lame, 9 libao, 10 libzakalwe, 11 makeWrapper, 12 python3, 13 pkg-config, 14 sox, 15 vorbis-tools, 16 which, 17}: 18 19stdenv.mkDerivation (finalAttrs: { 20 pname = "uade"; 21 version = "3.05"; 22 23 src = fetchFromGitLab { 24 owner = "uade-music-player"; 25 repo = "uade"; 26 rev = "uade-${finalAttrs.version}"; 27 hash = "sha256-k6t8EQ/G8PbfRrBMXubn1XfBPvw1qDoMGh5xJKrcX+E="; 28 }; 29 30 postPatch = '' 31 patchShebangs configure 32 33 substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \ 34 --replace-fail '-e stat' '-n stat' \ 35 --replace-fail '/usr/local' "$out" 36 37 substituteInPlace python/uade/generate_oscilloscope_view.py \ 38 --replace-fail "default='uade123'" "default='$out/bin/uade123'" 39 ''; 40 41 nativeBuildInputs = [ 42 makeWrapper 43 pkg-config 44 which 45 ]; 46 47 buildInputs = [ 48 bencodetools 49 flac 50 lame 51 libao 52 libzakalwe 53 sox 54 vorbis-tools 55 ]; 56 57 configureFlags = [ 58 "--bencode-tools-prefix=${bencodetools}" 59 "--libzakalwe-prefix=${libzakalwe}" 60 (lib.strings.withFeature true "text-scope") 61 (lib.strings.withFeature false "write-audio") 62 ]; 63 64 enableParallelBuilding = true; 65 66 hardeningDisable = [ "format" ]; 67 68 postInstall = '' 69 wrapProgram $out/bin/mod2ogg2.sh \ 70 --prefix PATH : $out/bin:${ 71 lib.makeBinPath [ 72 flac 73 lame 74 sox 75 vorbis-tools 76 ] 77 } 78 79 # This is an old script, don't break expectations by renaming it 80 ln -s $out/bin/mod2ogg2{.sh,} 81 ''; 82 83 passthru.updateScript = gitUpdater { rev-prefix = "uade-"; }; 84 85 meta = { 86 description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API"; 87 homepage = "https://zakalwe.fi/uade/"; 88 # It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g. 89 # - hippel-coso player is "[not] under any Open Source certified license" 90 # - infogrames player is disassembled from Andi Silvas player, unknown license 91 # Let's make it easy and flag the whole package as unfree. 92 license = lib.licenses.unfree; 93 maintainers = with lib.maintainers; [ OPNA2608 ]; 94 mainProgram = "uade123"; 95 platforms = lib.platforms.unix; 96 }; 97})