all: embrace unit packages where possible

This commit is contained in:
2023-02-23 11:46:04 +11:00
parent e053da240d
commit 5410671050
16 changed files with 21 additions and 26 deletions

View File

@ -1,29 +0,0 @@
{ lib
, fetchFromGitHub
, python3Packages
}:
python3Packages.buildPythonApplication rec {
pname = "amdgpu-fan";
version = "0.0.6";
src = fetchFromGitHub {
repo = pname;
owner = "chestm007";
rev = version;
sha256 = "1ngfrk6agk8wz0q9426lwrqhbgxc98hrsv0kn6wgz25j1rv9332b";
};
propagatedBuildInputs = with python3Packages; [
numpy
pyyaml
];
meta = with lib; {
description = "Fan controller for AMD graphics cards running the amdgpu driver on Linux";
homepage = "https://github.com/chestm007/amdgpu-fan";
license = licenses.gpl2;
platforms = platforms.linux;
};
}

View File

@ -1,48 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, curl
, gnumake
, gnutls
, gtk3
, gtkmm3
, pkg-config
, yajl
}:
stdenv.mkDerivation rec {
pname = "SamRewritten";
version = "2.1";
src = fetchFromGitHub {
owner = "PaulCombal";
repo = pname;
rev = "202008";
sha256 = "ab7903b997675b0d4d7eede15430fc5ca2736e6c25c7f95a7c97e1ce25582a1c";
};
nativeBuildInputs = [ gnumake pkg-config ];
buildInputs = [
curl
gnutls
gtk3
gtkmm3
yajl
];
NIX_CFLAGS_LINK = "-pthread";
makeFlags = [ "PREFIX=$(out)" ];
postFixup = ''
substituteInPlace $out/share/applications/samrewritten.desktop \
--replace /usr/bin/samrewritten $out/bin/samrewritten
'';
meta = with lib; {
description = "Steam Achievement Manager For Linux";
homepage = "https://github.com/PaulCombal/SamRewritten";
license = licenses.gpl3;
platforms = platforms.linux;
};
}

View File

@ -1,73 +0,0 @@
{ lib
, fetchFromGitHub
, python3Packages
, lame
, aacSupport ? false
, faac
, alacSupport ? false
, libav
, flacSupport ? false
, flac
, m4aSupport ? false
, mp4Support ? false
, fdk-aac-encoder
, oggSupport ? false
, vorbisTools
, opusSupport ? false
, opusTools
}:
assert aacSupport -> faac.meta.available;
assert alacSupport -> libav.meta.available;
assert flacSupport -> flac.meta.available;
assert m4aSupport || mp4Support -> fdk-aac-encoder.meta.available;
assert oggSupport -> vorbisTools.meta.available;
assert opusSupport -> opusTools.meta.available;
python3Packages.buildPythonApplication rec {
pname = "spotify-ripper";
version = "20210724.5bfd3f7";
src = fetchFromGitHub {
owner = "ast261";
repo = pname;
rev = "5bfd3f7a52f2767b433fd315145409837a3c33f0";
sha256 = "sha256-LLunGzs9Mg4S00Su260b+M5w/XwS+kICl/YXQdR/cPI=";
};
propagatedBuildInputs = (with python3Packages; [
colorama
mutagen
pyspotify
requests
schedule
setuptools
spotipy
]) ++ [
lame
(if flacSupport then flac else null)
(if alacSupport then libav else null)
(if aacSupport then faac else null)
(if (m4aSupport || mp4Support) then fdk-aac-encoder else null)
(if oggSupport then vorbisTools else null)
(if opusSupport then opusTools else null)
];
# Remove impure executables.
patches = [ ./fix-setup.patch ];
meta = with lib; {
description = "Rip Spotify URIs to audio files, including ID3 tags and cover art";
longDescription = ''
Spotify-ripper is a small ripper script for Spotify that rips Spotify URIs
to audio files and includes ID3 tags and cover art. By default
spotify-ripper will encode to MP3 files, but includes the ability to rip
to WAV, FLAC, Ogg Vorbis, Opus, AAC, and MP4/M4A.
'';
homepage = "https://github.com/hbashton/spotify-ripper";
# spotify-ripper itself is MIT, but the upstream libspotify is unfree.
license = licenses.unfree;
};
}

View File

@ -1,24 +0,0 @@
diff --git a/setup.py b/setup.py
index a800b3b..8967921 100755
--- a/setup.py
+++ b/setup.py
@@ -33,14 +33,13 @@ setup(
name='spotify-ripper',
version='2.9.1',
packages=find_packages(exclude=["tests"]),
- scripts=['spotify_ripper/main.py'],
include_package_data=True,
zip_safe=False,
# Executable
entry_points={
'console_scripts': [
- 'spotify-ripper = main:main',
+ 'spotify-ripper = spotify_ripper.main:main',
],
},
@@ -121,3 +121,2 @@ setup(
return True
-create_default_dir()

View File

@ -1,37 +0,0 @@
{ stdenv
, lib
, fetchFromGitHub
, python3
, ffmpeg
}:
stdenv.mkDerivation rec {
pname = "ytarchive";
version = "0.2.2";
src = fetchFromGitHub {
owner = "Kethsar";
repo = "ytarchive";
rev = "v${version}";
sha256 = "xT45FF0ztWQXzQgYztl2YKiI2iGJfnCXgCMw8gOmxzM=";
};
propagatedBuildInputs = [
python3
ffmpeg
];
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
install -Dm00755 ytarchive.py $out/bin/ytarchive
'';
meta = with lib; {
description = "Garbage Youtube livestream downloader";
homepage = "https://github.com/Kethsar/ytarchive";
license = licenses.mit;
platforms = python3.meta.platforms;
};
}