Merge branch 'master' into staging-next
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{ stdenv, fetchurl, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alda";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/alda-lang/alda/releases/download/${version}/alda";
|
||||
sha256 = "1d0412jw37gh1y7i8cmaml8r4sn516i6pxmm8m16yprqmz6glx28";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 $src $out/bin/alda
|
||||
sed -i -e '1 s!java!${jre}/bin/java!' $out/bin/alda
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A music programming language for musicians.";
|
||||
homepage = "https://alda.io";
|
||||
license = licenses.epl10;
|
||||
maintainers = [ maintainers.ericdallo ];
|
||||
platforms = jre.meta.platforms;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ let
|
||||
{ callPackage, lib, stdenv, nixosTests, config, fetchurl, makeWrapper
|
||||
, symlinkJoin, writeText, autoconf, automake, bison, flex, libtool
|
||||
, pkgconfig, re2c, apacheHttpd, libargon2, libxml2, pcre, pcre2
|
||||
, systemd, valgrind, xcbuild
|
||||
, systemd, system-sendmail, valgrind, xcbuild
|
||||
|
||||
, version
|
||||
, sha256
|
||||
@@ -195,6 +195,10 @@ let
|
||||
++ lib.optional systemdSupport "--with-fpm-systemd"
|
||||
++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}"
|
||||
++ lib.optional ztsSupport "--enable-maintainer-zts"
|
||||
|
||||
|
||||
# Sendmail
|
||||
++ [ "PROG_SENDMAIL=${system-sendmail}/bin/sendmail" ]
|
||||
;
|
||||
|
||||
hardeningDisable = [ "bindnow" ];
|
||||
|
||||
@@ -105,81 +105,81 @@ let
|
||||
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
|
||||
]) // {
|
||||
|
||||
name = namePrefix + name;
|
||||
name = namePrefix + name;
|
||||
|
||||
nativeBuildInputs = [
|
||||
python
|
||||
wrapPython
|
||||
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
|
||||
pythonRecompileBytecodeHook # Remove when solved https://github.com/NixOS/nixpkgs/issues/81441
|
||||
pythonRemoveTestsDirHook
|
||||
] ++ lib.optionals catchConflicts [
|
||||
setuptools pythonCatchConflictsHook
|
||||
] ++ lib.optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
|
||||
unzip
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
setuptoolsBuildHook
|
||||
] ++ lib.optionals (format == "flit") [
|
||||
flitBuildHook
|
||||
] ++ lib.optionals (format == "pyproject") [
|
||||
pipBuildHook
|
||||
] ++ lib.optionals (format == "wheel") [
|
||||
wheelUnpackHook
|
||||
] ++ lib.optionals (format == "egg") [
|
||||
eggUnpackHook eggBuildHook eggInstallHook
|
||||
] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
|
||||
pipInstallHook
|
||||
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
|
||||
# This is a test, however, it should be ran independent of the checkPhase and checkInputs
|
||||
pythonImportsCheckHook
|
||||
] ++ lib.optionals (python.pythonAtLeast "3.3") [
|
||||
# Optionally enforce PEP420 for python3
|
||||
pythonNamespacesHook
|
||||
] ++ nativeBuildInputs;
|
||||
nativeBuildInputs = [
|
||||
python
|
||||
wrapPython
|
||||
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
|
||||
pythonRecompileBytecodeHook # Remove when solved https://github.com/NixOS/nixpkgs/issues/81441
|
||||
pythonRemoveTestsDirHook
|
||||
] ++ lib.optionals catchConflicts [
|
||||
setuptools pythonCatchConflictsHook
|
||||
] ++ lib.optionals removeBinBytecode [
|
||||
pythonRemoveBinBytecodeHook
|
||||
] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
|
||||
unzip
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
setuptoolsBuildHook
|
||||
] ++ lib.optionals (format == "flit") [
|
||||
flitBuildHook
|
||||
] ++ lib.optionals (format == "pyproject") [
|
||||
pipBuildHook
|
||||
] ++ lib.optionals (format == "wheel") [
|
||||
wheelUnpackHook
|
||||
] ++ lib.optionals (format == "egg") [
|
||||
eggUnpackHook eggBuildHook eggInstallHook
|
||||
] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
|
||||
pipInstallHook
|
||||
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
|
||||
# This is a test, however, it should be ran independent of the checkPhase and checkInputs
|
||||
pythonImportsCheckHook
|
||||
] ++ lib.optionals (python.pythonAtLeast "3.3") [
|
||||
# Optionally enforce PEP420 for python3
|
||||
pythonNamespacesHook
|
||||
] ++ nativeBuildInputs;
|
||||
|
||||
buildInputs = buildInputs ++ pythonPath;
|
||||
buildInputs = buildInputs ++ pythonPath;
|
||||
|
||||
propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
|
||||
propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
|
||||
|
||||
inherit strictDeps;
|
||||
inherit strictDeps;
|
||||
|
||||
LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
LANG = "${if python.stdenv.isDarwin then "en_US" else "C"}.UTF-8";
|
||||
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
doInstallCheck = attrs.doCheck or true;
|
||||
installCheckInputs = [
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
# Longer-term we should get rid of this and require
|
||||
# users of this function to set the `installCheckPhase` or
|
||||
# pass in a hook that sets it.
|
||||
setuptoolsCheckHook
|
||||
] ++ checkInputs;
|
||||
# Python packages don't have a checkPhase, only an installCheckPhase
|
||||
doCheck = false;
|
||||
doInstallCheck = attrs.doCheck or true;
|
||||
installCheckInputs = [
|
||||
] ++ lib.optionals (format == "setuptools") [
|
||||
# Longer-term we should get rid of this and require
|
||||
# users of this function to set the `installCheckPhase` or
|
||||
# pass in a hook that sets it.
|
||||
setuptoolsCheckHook
|
||||
] ++ checkInputs;
|
||||
|
||||
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
|
||||
wrapPythonPrograms
|
||||
'' + attrs.postFixup or '''';
|
||||
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
|
||||
wrapPythonPrograms
|
||||
'' + attrs.postFixup or '''';
|
||||
|
||||
# Python packages built through cross-compilation are always for the host platform.
|
||||
disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
|
||||
# Python packages built through cross-compilation are always for the host platform.
|
||||
disallowedReferences = lib.optionals (python.stdenv.hostPlatform != python.stdenv.buildPlatform) [ python.pythonForBuild ];
|
||||
|
||||
# For now, revert recompilation of bytecode.
|
||||
dontUsePythonRecompileBytecode = true;
|
||||
# For now, revert recompilation of bytecode.
|
||||
dontUsePythonRecompileBytecode = true;
|
||||
|
||||
meta = {
|
||||
# default to python's platforms
|
||||
platforms = python.meta.platforms;
|
||||
isBuildPythonPackage = python.meta.platforms;
|
||||
} // meta;
|
||||
} // lib.optionalAttrs (attrs?checkPhase) {
|
||||
# If given use the specified checkPhase, otherwise use the setup hook.
|
||||
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
|
||||
installCheckPhase = attrs.checkPhase;
|
||||
}));
|
||||
meta = {
|
||||
# default to python's platforms
|
||||
platforms = python.meta.platforms;
|
||||
isBuildPythonPackage = python.meta.platforms;
|
||||
} // meta;
|
||||
} // lib.optionalAttrs (attrs?checkPhase) {
|
||||
# If given use the specified checkPhase, otherwise use the setup hook.
|
||||
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
|
||||
installCheckPhase = attrs.checkPhase;
|
||||
}));
|
||||
|
||||
passthru.updateScript = let
|
||||
filename = builtins.head (lib.splitString ":" self.meta.position);
|
||||
in attrs.passthru.updateScript or [ update-python-libraries filename ];
|
||||
passthru.updateScript = let
|
||||
filename = builtins.head (lib.splitString ":" self.meta.position);
|
||||
in attrs.passthru.updateScript or [ update-python-libraries filename ];
|
||||
in lib.extendDerivation true passthru self
|
||||
|
||||
Reference in New Issue
Block a user