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.
72 lines
1.4 KiB
Nix
72 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, libmpdclient
|
|
, openssl
|
|
, lua5_3
|
|
, libid3tag
|
|
, flac
|
|
, pcre2
|
|
, gzip
|
|
, perl
|
|
, jq
|
|
, nixosTests
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "mympd";
|
|
version = "18.1.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jcorporation";
|
|
repo = "myMPD";
|
|
rev = "v${finalAttrs.version}";
|
|
sha256 = "sha256-4BGW7jDeqwhbAi1LODeiFrmBIzv0qAMKT3IVRgYn87E=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
cmake
|
|
gzip
|
|
perl
|
|
jq
|
|
];
|
|
preConfigure = ''
|
|
env MYMPD_BUILDDIR=$PWD/build ./build.sh createassets
|
|
'';
|
|
buildInputs = [
|
|
libmpdclient
|
|
openssl
|
|
lua5_3
|
|
libid3tag
|
|
flac
|
|
pcre2
|
|
];
|
|
|
|
cmakeFlags = [
|
|
# Otherwise, it tries to parse $out/etc/mympd.conf on startup.
|
|
"-DCMAKE_INSTALL_SYSCONFDIR=/etc"
|
|
# similarly here
|
|
"-DCMAKE_INSTALL_LOCALSTATEDIR=/var/lib/mympd"
|
|
];
|
|
hardeningDisable = [
|
|
# causes redefinition of _FORTIFY_SOURCE
|
|
"fortify3"
|
|
];
|
|
# 5 tests out of 23 fail, probably due to the sandbox...
|
|
doCheck = false;
|
|
|
|
passthru.tests = { inherit (nixosTests) mympd; };
|
|
|
|
meta = {
|
|
homepage = "https://jcorporation.github.io/myMPD";
|
|
description = "Standalone and mobile friendly web mpd client with a tiny footprint and advanced features";
|
|
maintainers = [ lib.maintainers.doronbehar ];
|
|
platforms = lib.platforms.linux;
|
|
license = lib.licenses.gpl2Plus;
|
|
mainProgram = "mympd";
|
|
};
|
|
})
|