nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

bencodetools,uade: Fix build, update, modernise (#352867)

authored by

Cosima Neidahl and committed by
GitHub
2f3db1d3 fbd28d1b

+166 -67
+25 -16
pkgs/by-name/be/bencodetools/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchFromGitLab, 5 - python3, 5 + gitUpdater, 6 + python3Packages, 6 7 }: 7 8 8 - stdenv.mkDerivation { 9 + stdenv.mkDerivation (finalAttrs: { 9 10 pname = "bencodetools"; 10 - version = "unstable-2022-05-11"; 11 + version = "1.0.1"; 11 12 12 13 src = fetchFromGitLab { 13 14 owner = "heikkiorsila"; 14 15 repo = "bencodetools"; 15 - rev = "384d78d297a561dddbbd0f4632f0c74c0db41577"; 16 - sha256 = "1d699q9r33hkmmqkbh92ax54mcdf9smscmc0dza2gp4srkhr83qm"; 16 + rev = "refs/tags/v${finalAttrs.version}"; 17 + hash = "sha256-5Y1r6+aVtK22lYr2N+YUPPdUts9PIF9I/Pq/mI+WqQs="; 17 18 }; 18 19 19 20 postPatch = '' 20 21 patchShebangs configure 21 - substituteInPlace configure \ 22 - --replace 'python_install_option=""' 'python_install_option="--prefix=$out"' 23 22 ''; 24 23 25 24 enableParallelBuilding = true; 26 25 27 - nativeBuildInputs = [ 28 - (python3.withPackages (ps: with ps; [ distutils ])) 29 - ]; 26 + configureFlags = [ (lib.strings.withFeature false "python") ]; 30 27 31 28 # installCheck instead of check due to -install_name'd library on Darwin 32 29 doInstallCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 33 - installCheckTarget = "check"; 34 30 35 - meta = with lib; { 31 + installCheckPhase = '' 32 + runHook preInstallCheck 33 + 34 + ./bencodetest 35 + 36 + runHook postInstallCheck 37 + ''; 38 + 39 + passthru = { 40 + tests.python-module = python3Packages.bencodetools; 41 + updateScript = gitUpdater { rev-prefix = "v"; }; 42 + }; 43 + 44 + meta = { 36 45 description = "Collection of tools for manipulating bencoded data"; 37 46 homepage = "https://gitlab.com/heikkiorsila/bencodetools"; 38 - license = licenses.bsd2; 39 - maintainers = with maintainers; [ OPNA2608 ]; 47 + license = lib.licenses.bsd2; 48 + maintainers = with lib.maintainers; [ OPNA2608 ]; 40 49 mainProgram = "bencat"; 41 - platforms = platforms.unix; 50 + platforms = lib.platforms.unix; 42 51 }; 43 - } 52 + })
+58
pkgs/by-name/li/libzakalwe/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitLab, 5 + unstableGitUpdater, 6 + }: 7 + 8 + stdenv.mkDerivation (finalAttrs: { 9 + pname = "libzakalwe"; 10 + version = "1.0.0-unstable-2024-02-26"; 11 + 12 + src = fetchFromGitLab { 13 + owner = "hors"; 14 + repo = "libzakalwe"; 15 + rev = "c7eba014ba14dc6fa145f6e71e75cca2b65bbc8a"; 16 + hash = "sha256-2a30ztFnemCgGW/I5S6Dz4eC1Y6K2aV9dPvysvQtBxo="; 17 + }; 18 + 19 + outputs = [ 20 + "out" 21 + "dev" 22 + ]; 23 + 24 + postPatch = 25 + '' 26 + substituteInPlace Makefile.in \ 27 + --replace-fail 'libzakalwe.so' "libzakalwe${stdenv.hostPlatform.extensions.sharedLibrary}" 28 + '' 29 + + lib.optionalString stdenv.hostPlatform.isDarwin '' 30 + substituteInPlace Makefile.in \ 31 + --replace-fail '-soname' '-install_name' 32 + ''; 33 + 34 + strictDeps = true; 35 + 36 + enableParallelBuilding = true; 37 + 38 + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; 39 + 40 + # Darwin: Assertion failed at thread_util_test_0:52: tr != NULL 41 + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform && (!stdenv.hostPlatform.isDarwin); 42 + 43 + installFlags = [ "PREFIX=$(out)" ]; 44 + 45 + preInstall = '' 46 + mkdir -p $out/lib 47 + ''; 48 + 49 + passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; }; 50 + 51 + meta = { 52 + description = "Library for functions shared across zakalwe projects"; 53 + homepage = "https://gitlab.com/hors/libzakalwe"; 54 + license = lib.licenses.bsd2; 55 + maintainers = with lib.maintainers; [ OPNA2608 ]; 56 + platforms = lib.platforms.unix; 57 + }; 58 + })
+49 -51
pkgs/by-name/ua/uade/package.nix
··· 1 - { lib 2 - , stdenv 3 - , fetchFromGitLab 4 - , python3 5 - , pkg-config 6 - , which 7 - , makeWrapper 8 - , libao 9 - , bencodetools 10 - , sox 11 - , lame 12 - , flac 13 - , vorbis-tools 14 - # https://gitlab.com/uade-music-player/uade/-/issues/38 15 - , withWriteAudio ? !stdenv.hostPlatform.isDarwin 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, 16 17 }: 17 18 18 - stdenv.mkDerivation rec { 19 + stdenv.mkDerivation (finalAttrs: { 19 20 pname = "uade"; 20 - version = "3.02"; 21 + version = "3.05"; 21 22 22 23 src = fetchFromGitLab { 23 24 owner = "uade-music-player"; 24 25 repo = "uade"; 25 - rev = "uade-${version}"; 26 - hash = "sha256-skPEXBQwyr326zCmZ2jwGxcBoTt3Y/h2hagDeeqbMpw="; 26 + rev = "uade-${finalAttrs.version}"; 27 + hash = "sha256-k6t8EQ/G8PbfRrBMXubn1XfBPvw1qDoMGh5xJKrcX+E="; 27 28 }; 28 29 29 30 postPatch = '' 30 31 patchShebangs configure 31 - substituteInPlace configure \ 32 - --replace 'PYTHON_SETUP_ARGS=""' 'PYTHON_SETUP_ARGS="--prefix=$out"' 32 + 33 33 substituteInPlace src/frontends/mod2ogg/mod2ogg2.sh.in \ 34 - --replace '-e stat' '-n stat' \ 35 - --replace '/usr/local' "$out" 34 + --replace-fail '-e stat' '-n stat' \ 35 + --replace-fail '/usr/local' "$out" 36 + 36 37 substituteInPlace python/uade/generate_oscilloscope_view.py \ 37 - --replace "default='uade123'" "default='$out/bin/uade123'" 38 - # https://gitlab.com/uade-music-player/uade/-/issues/37 39 - substituteInPlace write_audio/Makefile.in \ 40 - --replace 'g++' '${stdenv.cc.targetPrefix}c++' 38 + --replace-fail "default='uade123'" "default='$out/bin/uade123'" 41 39 ''; 42 40 43 41 nativeBuildInputs = [ 42 + makeWrapper 44 43 pkg-config 45 44 which 46 - makeWrapper 47 - ] ++ lib.optionals withWriteAudio [ 48 - python3 49 45 ]; 50 46 51 47 buildInputs = [ 52 - libao 53 48 bencodetools 54 - sox 55 - lame 56 49 flac 50 + lame 51 + libao 52 + libzakalwe 53 + sox 57 54 vorbis-tools 58 - ] ++ lib.optionals withWriteAudio [ 59 - (python3.withPackages (p: with p; [ 60 - pillow 61 - tqdm 62 - more-itertools 63 - ])) 64 55 ]; 65 56 66 57 configureFlags = [ 67 58 "--bencode-tools-prefix=${bencodetools}" 68 - "--with-text-scope" 69 - ] ++ lib.optionals (!withWriteAudio) [ 70 - "--without-write-audio" 59 + "--libzakalwe-prefix=${libzakalwe}" 60 + (lib.strings.withFeature true "text-scope") 61 + (lib.strings.withFeature false "write-audio") 71 62 ]; 72 63 73 64 enableParallelBuilding = true; ··· 67 76 68 77 postInstall = '' 69 78 wrapProgram $out/bin/mod2ogg2.sh \ 70 - --prefix PATH : $out/bin:${lib.makeBinPath [ sox lame flac vorbis-tools ]} 79 + --prefix PATH : $out/bin:${ 80 + lib.makeBinPath [ 81 + flac 82 + lame 83 + sox 84 + vorbis-tools 85 + ] 86 + } 87 + 71 88 # This is an old script, don't break expectations by renaming it 72 89 ln -s $out/bin/mod2ogg2{.sh,} 73 - '' + lib.optionalString withWriteAudio '' 74 - wrapProgram $out/bin/generate_amiga_oscilloscope_view \ 75 - --prefix PYTHONPATH : "$PYTHONPATH:$out/${python3.sitePackages}" 76 90 ''; 77 91 78 - meta = with lib; { 92 + passthru.updateScript = gitUpdater { rev-prefix = "uade-"; }; 93 + 94 + meta = { 79 95 description = "Plays old Amiga tunes through UAE emulation and cloned m68k-assembler Eagleplayer API"; 80 96 homepage = "https://zakalwe.fi/uade/"; 81 97 # It's a mix of licenses. "GPL", Public Domain, "LGPL", GPL2+, BSD, LGPL21+ and source code with unknown licenses. E.g. 82 98 # - hippel-coso player is "[not] under any Open Source certified license" 83 99 # - infogrames player is disassembled from Andi Silvas player, unknown license 84 100 # Let's make it easy and flag the whole package as unfree. 85 - license = licenses.unfree; 86 - maintainers = with maintainers; [ OPNA2608 ]; 101 + license = lib.licenses.unfree; 102 + maintainers = with lib.maintainers; [ OPNA2608 ]; 87 103 mainProgram = "uade123"; 88 - platforms = platforms.unix; 104 + platforms = lib.platforms.unix; 89 105 }; 90 - } 106 + })
+30
pkgs/development/python-modules/bencodetools/default.nix
··· 1 + { 2 + buildPythonPackage, 3 + bencodetools, 4 + pytestCheckHook, 5 + setuptools, 6 + }: 7 + buildPythonPackage { 8 + inherit (bencodetools) pname version src; 9 + format = "pyproject"; 10 + 11 + nativeBuildInputs = [ setuptools ]; 12 + 13 + nativeCheckInputs = [ pytestCheckHook ]; 14 + 15 + dontConfigure = true; 16 + 17 + pythonImportsCheck = [ 18 + "bencode" 19 + "typevalidator" 20 + ]; 21 + 22 + meta = { 23 + inherit (bencodetools.meta) 24 + description 25 + homepage 26 + license 27 + maintainers 28 + ; 29 + }; 30 + }
+4
pkgs/top-level/python-packages.nix
··· 1575 1575 1576 1576 bencoder = callPackage ../development/python-modules/bencoder { }; 1577 1577 1578 + bencodetools = callPackage ../development/python-modules/bencodetools { 1579 + bencodetools = pkgs.bencodetools; 1580 + }; 1581 + 1578 1582 beniget = callPackage ../development/python-modules/beniget { }; 1579 1583 1580 1584 bentoml = callPackage ../development/python-modules/bentoml { };