mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
41 lines
991 B
Nix
41 lines
991 B
Nix
{ lib, fetchFromGitHub, python3, makeWrapper }:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "headphones";
|
|
version = "0.6.3";
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rembo10";
|
|
repo = "headphones";
|
|
rev = "v${version}";
|
|
sha256 = "195v0ylhqd49bqq3dpig5nh0kivmwgmn0977fknix9j14jpvmd3b";
|
|
};
|
|
|
|
dontBuild = true;
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin $out/opt/headphones
|
|
cp -R {data,headphones,lib,Headphones.py} $out/opt/headphones
|
|
|
|
echo v${version} > $out/opt/headphones/version.txt
|
|
|
|
makeWrapper $out/opt/headphones/Headphones.py $out/bin/headphones
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Automatic music downloader for SABnzbd";
|
|
license = licenses.gpl3Plus;
|
|
homepage = "https://github.com/rembo10/headphones";
|
|
maintainers = with lib.maintainers; [ rembo10 ];
|
|
mainProgram = "headphones";
|
|
};
|
|
}
|