Merge master into staging-next

This commit is contained in:
github-actions[bot] 2024-05-07 00:02:04 +00:00 committed by GitHub
commit 9b53839f00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
118 changed files with 1912 additions and 1267 deletions

View File

@ -108,3 +108,6 @@ fb0e5be84331188a69b3edd31679ca6576edb75a
# postgresql: move packages.nix to ext/default.nix # postgresql: move packages.nix to ext/default.nix
719034f6f6749d624faa28dff259309fc0e3e730 719034f6f6749d624faa28dff259309fc0e3e730
# pkgs/os-specific/bsd: Reformat with nixfmt-rfc-style 2024-03-01
3fe3b055adfc020e6a923c466b6bcd978a13069a

View File

@ -32,6 +32,7 @@ jobs:
# Each environment variable beginning with NIX_FMT_PATHS_ is a list of # Each environment variable beginning with NIX_FMT_PATHS_ is a list of
# paths to check with nixfmt. # paths to check with nixfmt.
env: env:
NIX_FMT_PATHS_BSD: pkgs/os-specific/bsd
NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts NIX_FMT_PATHS_MPVSCRIPTS: pkgs/applications/video/mpv/scripts
# Format paths related to the Nixpkgs CUDA ecosystem. # Format paths related to the Nixpkgs CUDA ecosystem.
NIX_FMT_PATHS_CUDA: | NIX_FMT_PATHS_CUDA: |

View File

@ -285,6 +285,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
"mysecret"` becomes `services.aria2.rpcSecretFile = "/path/to/secret_file"` "mysecret"` becomes `services.aria2.rpcSecretFile = "/path/to/secret_file"`
where the file `secret_file` contains the string `mysecret`. where the file `secret_file` contains the string `mysecret`.
- The `system.forbiddenDependenciesRegex` option has been renamed to `system.forbiddenDependenciesRegexes` and now has the type of `listOf string` instead of `string` to accept multiple regexes.
- `openssh`, `openssh_hpn` and `openssh_gssapi` are now compiled without support for the DSA signature algorithm as it is being deprecated upstream. Users still relying on DSA keys should consider upgrading - `openssh`, `openssh_hpn` and `openssh_gssapi` are now compiled without support for the DSA signature algorithm as it is being deprecated upstream. Users still relying on DSA keys should consider upgrading
to another signature algorithm. However, for the time being it is possible to restore DSA key support using `override` to set `dsaKeysSupport = true`. to another signature algorithm. However, for the time being it is possible to restore DSA key support using `override` to set `dsaKeysSupport = true`.

View File

@ -26,6 +26,6 @@
# Check that the system does not contain a Nix store path that contains the # Check that the system does not contain a Nix store path that contains the
# string "perl". # string "perl".
system.forbiddenDependenciesRegex = "perl"; system.forbiddenDependenciesRegexes = ["perl"];
} }

View File

@ -350,7 +350,7 @@ in {
RestartSec = "10s"; RestartSec = "10s";
CacheDirectory = dirs cacheDirs; CacheDirectory = dirs cacheDirs;
RuntimeDirectory = dirName; RuntimeDirectory = dirName;
ReadWriteDirectories = lib.mkIf useCustomDir [ cfg.storageDir ]; ReadWritePaths = lib.mkIf useCustomDir [ cfg.storageDir ];
StateDirectory = dirs (lib.optionals (!useCustomDir) libDirs); StateDirectory = dirs (lib.optionals (!useCustomDir) libDirs);
LogsDirectory = dirName; LogsDirectory = dirName;
PrivateTmp = true; PrivateTmp = true;

View File

@ -17,7 +17,7 @@ let
inherit (cfg.github) org team; inherit (cfg.github) org team;
}; }; }; };
google = cfg: { google = with cfg.google; optionalAttrs (groups != []) { google = cfg: { google = with cfg.google; lib.optionalAttrs (groups != []) {
admin-email = adminEmail; admin-email = adminEmail;
service-account = serviceAccountJSON; service-account = serviceAccountJSON;
group = groups; group = groups;

View File

@ -107,7 +107,7 @@ in
UMask = "0077"; UMask = "0077";
Environment = "HOME=%S/step-ca"; Environment = "HOME=%S/step-ca";
WorkingDirectory = ""; # override upstream WorkingDirectory = ""; # override upstream
ReadWriteDirectories = ""; # override upstream ReadWritePaths = ""; # override upstream
# LocalCredential handles file permission problems arising from the use of DynamicUser. # LocalCredential handles file permission problems arising from the use of DynamicUser.
LoadCredential = "intermediate_password:${cfg.intermediatePasswordFile}"; LoadCredential = "intermediate_password:${cfg.intermediatePasswordFile}";

View File

@ -360,6 +360,7 @@ in
serviceConfig = let serviceConfig = let
runOptions = ''--config ${configPath} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"}''; runOptions = ''--config ${configPath} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"}'';
in { in {
# Override the `ExecStart` line from upstream's systemd unit file by our own:
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= # https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=
# If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect. # If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect.
ExecStart = [ "" ''${cfg.package}/bin/caddy run ${runOptions} ${optionalString cfg.resume "--resume"}'' ]; ExecStart = [ "" ''${cfg.package}/bin/caddy run ${runOptions} ${optionalString cfg.resume "--resume"}'' ];
@ -367,7 +368,7 @@ in
ExecReload = [ "" ''${cfg.package}/bin/caddy reload ${runOptions} --force'' ]; ExecReload = [ "" ''${cfg.package}/bin/caddy reload ${runOptions} --force'' ];
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
ReadWriteDirectories = cfg.dataDir; ReadWritePaths = [ cfg.dataDir ];
StateDirectory = mkIf (cfg.dataDir == "/var/lib/caddy") [ "caddy" ]; StateDirectory = mkIf (cfg.dataDir == "/var/lib/caddy") [ "caddy" ];
LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ]; LogsDirectory = mkIf (cfg.logDir == "/var/log/caddy") [ "caddy" ];
Restart = "on-failure"; Restart = "on-failure";

View File

@ -170,7 +170,7 @@ in {
PrivateDevices = true; PrivateDevices = true;
ProtectHome = true; ProtectHome = true;
ProtectSystem = "full"; ProtectSystem = "full";
ReadWriteDirectories = cfg.dataDir; ReadWritePaths = [ cfg.dataDir ];
RuntimeDirectory = "traefik"; RuntimeDirectory = "traefik";
}; };
}; };

View File

@ -5,7 +5,7 @@
}: }:
let let
node-forbiddenDependencies-fail = nixos ({ ... }: { node-forbiddenDependencies-fail = nixos ({ ... }: {
system.forbiddenDependenciesRegex = "-dev$"; system.forbiddenDependenciesRegexes = ["-dev$"];
environment.etc."dev-dependency" = { environment.etc."dev-dependency" = {
text = "${expect.dev}"; text = "${expect.dev}";
}; };
@ -14,7 +14,7 @@ let
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
}); });
node-forbiddenDependencies-succeed = nixos ({ ... }: { node-forbiddenDependencies-succeed = nixos ({ ... }: {
system.forbiddenDependenciesRegex = "-dev$"; system.forbiddenDependenciesRegexes = ["-dev$"];
system.extraDependencies = [ expect.dev ]; system.extraDependencies = [ expect.dev ];
documentation.enable = false; documentation.enable = false;
fileSystems."/".device = "ignore-root-device"; fileSystems."/".device = "ignore-root-device";

View File

@ -86,6 +86,7 @@ in
../build.nix ../build.nix
(mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.") (mkRemovedOptionModule [ "nesting" "clone" ] "Use `specialisation.«name» = { inheritParentConfig = true; configuration = { ... }; }` instead.")
(mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.") (mkRemovedOptionModule [ "nesting" "children" ] "Use `specialisation.«name».configuration = { ... }` instead.")
(mkRenamedOptionModule [ "system" "forbiddenDependenciesRegex" ] [ "system" "forbiddenDependenciesRegexes" ])
]; ];
options = { options = {
@ -160,12 +161,12 @@ in
''; '';
}; };
system.forbiddenDependenciesRegex = mkOption { system.forbiddenDependenciesRegexes = mkOption {
default = ""; default = [];
example = "-dev$"; example = ["-dev$"];
type = types.str; type = types.listOf types.str;
description = '' description = ''
A POSIX Extended Regular Expression that matches store paths that POSIX Extended Regular Expressions that match store paths that
should not appear in the system closure, with the exception of {option}`system.extraDependencies`, which is not checked. should not appear in the system closure, with the exception of {option}`system.extraDependencies`, which is not checked.
''; '';
}; };
@ -289,15 +290,14 @@ in
"$out/configuration.nix" "$out/configuration.nix"
'' + '' +
optionalString optionalString
(config.system.forbiddenDependenciesRegex != "") (config.system.forbiddenDependenciesRegexes != []) (lib.concatStringsSep "\n" (map (regex: ''
'' if [[ ${regex} != "" && -n $closureInfo ]]; then
if [[ $forbiddenDependenciesRegex != "" && -n $closureInfo ]]; then if forbiddenPaths="$(grep -E -- "${regex}" $closureInfo/store-paths)"; then
if forbiddenPaths="$(grep -E -- "$forbiddenDependenciesRegex" $closureInfo/store-paths)"; then
echo -e "System closure $out contains the following disallowed paths:\n$forbiddenPaths" echo -e "System closure $out contains the following disallowed paths:\n$forbiddenPaths"
exit 1 exit 1
fi fi
fi fi
''; '') config.system.forbiddenDependenciesRegexes));
system.systemBuilderArgs = { system.systemBuilderArgs = {
@ -319,8 +319,7 @@ in
# option, as opposed to `system.extraDependencies`. # option, as opposed to `system.extraDependencies`.
passedChecks = concatStringsSep " " config.system.checks; passedChecks = concatStringsSep " " config.system.checks;
} }
// lib.optionalAttrs (config.system.forbiddenDependenciesRegex != "") { // lib.optionalAttrs (config.system.forbiddenDependenciesRegexes != []) {
inherit (config.system) forbiddenDependenciesRegex;
closureInfo = pkgs.closureInfo { rootPaths = [ closureInfo = pkgs.closureInfo { rootPaths = [
# override to avoid infinite recursion (and to allow using extraDependencies to add forbidden dependencies) # override to avoid infinite recursion (and to allow using extraDependencies to add forbidden dependencies)
(config.system.build.toplevel.overrideAttrs (_: { extraDependencies = []; closureInfo = null; })) (config.system.build.toplevel.overrideAttrs (_: { extraDependencies = []; closureInfo = null; }))

View File

@ -1,76 +0,0 @@
{ lib, stdenv, requireFile, unzip, rlwrap, bash, zlib }:
assert (stdenv.hostPlatform.system == "i686-linux");
let
libPath = lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc zlib ];
in
stdenv.mkDerivation rec {
pname = "kdbplus";
version = "3.6";
src = requireFile rec {
message = ''
Nix can't download kdb+ for you automatically. Go to
http://kx.com and download the free, 32-bit version for
Linux. Then run "nix-prefetch-url file://\$PWD/${name}" in
the directory where you saved it. Note you need version ${version}.
'';
name = "linuxx86.zip";
sha256 = "0w6znd9warcqx28vf648n0vgmxyyy9kvsfpsfw37d1kp5finap4p";
};
dontStrip = true;
nativeBuildInputs = [ unzip ];
phases = "unpackPhase installPhase";
unpackPhase = "mkdir ${pname}-${version} && cd ${pname}-${version} && unzip -qq ${src}";
installPhase = ''
mkdir -p $out/bin $out/libexec
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath} \
./q/l32/q
mv ./q/l32/q $out/libexec/q
# Shell script wrappers to make things more convenient...
cat > $out/bin/q-install <<- EOF
#!${bash}/bin/bash
if [ -f \$HOME/q/q.k ]; then
echo "kdb has already been unpacked in \$HOME. Skipping..."
exit 0
fi
echo -n "Unzipping ${src} into \$HOME... "
cd \$HOME && ${unzip}/bin/unzip -qq ${src}
echo "Done"
EOF
cat > $out/bin/q <<- EOF
#!${bash}/bin/bash
if [ ! -f \$HOME/q/q.k ]; then
echo "ERROR: You need to unzip the Q sources into \$HOME before running q."
echo
echo "Try:"
echo " cd \$HOME && unzip ${src}"
echo "(or run q-install)"
exit 1
fi
exec ${rlwrap}/bin/rlwrap $out/libexec/q \$@
EOF
chmod +x $out/bin/q $out/bin/q-install
'';
meta = {
description = "Analytics and time-series database";
homepage = "http://www.kx.com/";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "i686-linux" ];
maintainers = [ lib.maintainers.thoughtpolice ];
};
}

View File

@ -9,11 +9,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gitnuro"; pname = "gitnuro";
version = "1.1.1"; version = "1.3.1";
src = fetchurl { src = fetchurl {
url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-${version}.jar"; url = "https://github.com/JetpackDuba/Gitnuro/releases/download/v${version}/Gitnuro-linux-x86_64-${version}.jar";
hash = "sha256-ugZBk/aQ2pjL9xY66g20MorAQ02GHIdJTv8ejadaBgY="; hash = "sha256-7yne9dD/7VT+H4tIBJvpOf8ksECCpoNAa8TSmFmjYMw=";
}; };
icon = fetchurl { icon = fetchurl {
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
description = "A FOSS Git multiplatform client based on Compose and JGit"; description = "A FOSS Git multiplatform client based on Compose and JGit";
homepage = "https://gitnuro.com/"; homepage = "https://gitnuro.com/";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
platforms = platforms.unix; platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ zendo ]; maintainers = with maintainers; [ zendo ];
mainProgram = "gitnuro"; mainProgram = "gitnuro";
}; };

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/Yelp/dumb-init"; homepage = "https://github.com/Yelp/dumb-init";
license = licenses.mit; license = licenses.mit;
maintainers = [ ]; maintainers = [ ];
platforms = platforms.linux; platforms = platforms.unix;
mainProgram = "dumb-init"; mainProgram = "dumb-init";
}; };
} }

View File

@ -12,14 +12,14 @@
, withGpio ? stdenv.isLinux , withGpio ? stdenv.isLinux
}: }:
stdenv.mkDerivation { stdenv.mkDerivation (finalAttrs: {
pname = "flashprog"; pname = "flashprog";
version = "1.0.1"; version = "1.1";
src = fetchgit { src = fetchgit {
url = "https://review.sourcearcade.org/flashprog"; url = "https://review.sourcearcade.org/flashprog";
rev = "2ca11f9a4101ea230081d448ab2b570425b7f0bd"; rev = "v${finalAttrs.version}";
hash = "sha256-pm9g9iOJAKnzzY9couzt8RmqZFbIpKcO++zsUJ9o49U="; hash = "sha256-CLwaGxVOo8FJaWfvrJ2hAm7XonP5nHT6YTsaw7scKCM=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -60,4 +60,4 @@ stdenv.mkDerivation {
platforms = platforms.all; platforms = platforms.all;
mainProgram = "flashprog"; mainProgram = "flashprog";
}; };
} })

View File

@ -17,13 +17,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "flowtime"; pname = "flowtime";
version = "6.1"; version = "6.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Diego-Ivan"; owner = "Diego-Ivan";
repo = "Flowtime"; repo = "Flowtime";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-wTqHTkt1O3Da2fzxf6DiQjrqOt65ZEhLOkGK5C6HzIk="; hash = "sha256-J0Pscv0ZOpA/LV2mPTLOmDPQpfZhizTghatGnrJHToE=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -16,14 +16,14 @@
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "home-manager"; pname = "home-manager";
version = "0-unstable-2024-04-29"; version = "0-unstable-2024-05-05";
src = fetchFromGitHub { src = fetchFromGitHub {
name = "home-manager-source"; name = "home-manager-source";
owner = "nix-community"; owner = "nix-community";
repo = "home-manager"; repo = "home-manager";
rev = "9fe79591c1005ce6f93084ae7f7dab0a2891440d"; rev = "3dfe05aa9b5646995ace887931fa60269a039777";
hash = "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo="; hash = "sha256-QXpLmgmisNK2Zgpnu9DiO9ScrKJuJ4zmiMTNpObVIuk=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -23,13 +23,13 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "melonDS"; pname = "melonDS";
version = "0.9.5-unstable-2024-04-18"; version = "0.9.5-unstable-2024-05-05";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "melonDS-emu"; owner = "melonDS-emu";
repo = "melonDS"; repo = "melonDS";
rev = "ba8d547dfa81539f4e8474152d92e866ad89241b"; rev = "10798c3464ca0e199087960fda918ed99acc2e21";
hash = "sha256-va4KegM2z0GSA43goUynRPNPvQnrV2b8oNOfLKPE+Zc="; hash = "sha256-5GbJKhICrbVfnfZt6Ni4uNbodH3rJY5lKoQRgiPXWCg=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -0,0 +1,99 @@
{
lib,
boost,
ceres-solver,
cmake,
cminpack,
darwin,
dlib,
fetchFromGitHub,
fetchpatch,
hdf5,
hmat-oss,
ipopt,
libxml2,
nlopt,
pagmo2,
primesieve,
python3Packages,
spectra,
stdenv,
swig,
tbb,
# Boolean flags
runTests ? false, # tests take an hour to build on a 48-core machine
enablePython ? false,
}:
let
inherit (darwin.apple_sdk.frameworks) Accelerate;
in
stdenv.mkDerivation (finalAttrs: {
pname = "openturns";
version = "1.22";
src = fetchFromGitHub {
owner = "openturns";
repo = "openturns";
rev = "v${finalAttrs.version}";
hash = "sha256-ku3/mPoa1YJVJB99R/kWlOubIO+OZAiKfPqS/DrtJQk=";
};
nativeBuildInputs = [
cmake
]
++ lib.optionals enablePython [ python3Packages.sphinx ];
buildInputs = [
(lib.getLib primesieve)
boost
ceres-solver
cminpack
dlib
hdf5
hmat-oss
ipopt
libxml2
nlopt
pagmo2
spectra
swig
tbb
]
++ lib.optionals enablePython [
python3Packages.dill
python3Packages.matplotlib
python3Packages.psutil
python3Packages.python
]
++ lib.optionals stdenv.isDarwin [
Accelerate
];
cmakeFlags = [
(lib.cmakeBool "BUILD_PYTHON" enablePython)
(lib.cmakeBool "CMAKE_UNITY_BUILD" true)
(lib.cmakeBool "USE_SPHINX" enablePython)
(lib.cmakeFeature "CMAKE_UNITY_BUILD_BATCH_SIZE" "32")
(lib.cmakeFeature "SWIG_COMPILE_FLAGS" "-O1")
(lib.cmakeOptionType "PATH" "OPENTURNS_SYSCONFIG_PATH" "$out/etc")
];
checkTarget = lib.concatStringsSep " " [
"tests"
"check"
];
strictDeps = true;
doCheck = runTests;
meta = {
homepage = "https://openturns.github.io/www/";
description = "Multivariate probabilistic modeling and uncertainty treatment library";
changelog = "https://github.com/openturns/openturns/raw/v${finalAttrs.version}/ChangeLog";
license = with lib.licenses; [ lgpl3Plus gpl3Plus ];
maintainers = with lib.maintainers; [ gdinh ];
platforms = lib.platforms.unix;
};
})

View File

@ -2,12 +2,12 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "clojure"; pname = "clojure";
version = "1.11.3.1456"; version = "1.11.3.1463";
src = fetchurl { src = fetchurl {
# https://github.com/clojure/brew-install/releases # https://github.com/clojure/brew-install/releases
url = "https://github.com/clojure/brew-install/releases/download/${finalAttrs.version}/clojure-tools-${finalAttrs.version}.tar.gz"; url = "https://github.com/clojure/brew-install/releases/download/${finalAttrs.version}/clojure-tools-${finalAttrs.version}.tar.gz";
hash = "sha256-ymOkUUDSj5KzFMBY1D7gErjPAK5E/QjFDGcwDo5fzW0="; hash = "sha256-26QZ3j54XztpW2WJ1xg0Gc+OwrsvmfK4iv0GsLV8FIc=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeShellScript
, cmake , cmake
, ogre , ogre
, freetype , freetype
@ -13,7 +14,7 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "cegui"; pname = "cegui";
version = "unstable-2023-03-18"; version = "0-unstable-2023-03-18";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "paroj"; owner = "paroj";
@ -47,6 +48,12 @@ stdenv.mkDerivation {
passthru.updateScript = unstableGitUpdater { passthru.updateScript = unstableGitUpdater {
branch = "v0"; branch = "v0";
# The above branch is separate from the branch with the latest tags, so the updater doesn't pick them up
# This is what would be used to handle upstream's format, if it was able to see the tags
# tagConverter = writeShellScript "cegui-tag-converter.sh" ''
# sed -e 's/^v//g' -e 's/-/./g'
# '';
hardcodeZeroVersion = true;
}; };
meta = with lib; { meta = with lib; {

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "crossguid"; pname = "crossguid";
version = "unstable-2019-05-29"; version = "0.2.2-unstable-2019-05-29";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "graeme-hill"; owner = "graeme-hill";
@ -24,7 +24,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
buildInputs = lib.optional stdenv.isLinux libuuid; buildInputs = lib.optional stdenv.isLinux libuuid;
passthru.updateScript = unstableGitUpdater { }; passthru.updateScript = unstableGitUpdater {
tagPrefix = "v";
};
meta = with lib; { meta = with lib; {
description = "Lightweight cross platform C++ GUID/UUID library"; description = "Lightweight cross platform C++ GUID/UUID library";

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gl3w"; pname = "gl3w";
version = "unstable-2023-10-10"; version = "0-unstable-2023-10-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "skaslev"; owner = "skaslev";

View File

@ -15,7 +15,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gtk-frdp"; pname = "gtk-frdp";
version = "unstable-2024-03-01"; version = "3.37.1-unstable-2024-03-01";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "gitlab.gnome.org"; domain = "gitlab.gnome.org";
@ -41,7 +41,9 @@ stdenv.mkDerivation rec {
]; ];
passthru = { passthru = {
updateScript = unstableGitUpdater { }; updateScript = unstableGitUpdater {
tagPrefix = "v";
};
}; };
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [ env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [

View File

@ -9,7 +9,7 @@
multiStdenv.mkDerivation (finalAttrs: { multiStdenv.mkDerivation (finalAttrs: {
pname = "hax11"; pname = "hax11";
version = "unstable-2023-09-25"; version = "0-unstable-2023-09-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CyberShadow"; owner = "CyberShadow";

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "libcxxrt"; pname = "libcxxrt";
version = "unstable-2024-04-15"; version = "4.0.10-unstable-2024-04-15";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "libcxxrt"; owner = "libcxxrt";

View File

@ -10,7 +10,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libsegfault"; pname = "libsegfault";
version = "unstable-2022-11-13"; version = "0-unstable-2022-11-13";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jonathanpoelen"; owner = "jonathanpoelen";

View File

@ -42,7 +42,7 @@ let
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "libvgm"; pname = "libvgm";
version = "unstable-2024-04-24"; version = "0-unstable-2024-04-24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ValleyBell"; owner = "ValleyBell";

View File

@ -6,7 +6,7 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "libz"; pname = "libz";
version = "unstable-2018-03-31"; version = "1.2.8.2015.12.26-unstable-2018-03-31";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "sortix"; owner = "sortix";
@ -18,7 +18,9 @@ stdenv.mkDerivation (finalAttrs: {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
outputDoc = "dev"; # single tiny man3 page outputDoc = "dev"; # single tiny man3 page
passthru.updateScript = unstableGitUpdater { }; passthru.updateScript = unstableGitUpdater {
tagPrefix = "libz-";
};
meta = { meta = {
homepage = "https://sortix.org/libz/"; homepage = "https://sortix.org/libz/";

View File

@ -9,7 +9,7 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "minilibx"; pname = "minilibx";
version = "unstable-2021-10-30"; version = "0-unstable-2021-10-30";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "42Paris"; owner = "42Paris";

View File

@ -1,82 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, swig
, boost
, spectra
, libxml2
, tbb
, hmat-oss
, nlopt
, cminpack
, ceres-solver
, dlib
, hdf5
, primesieve
, pagmo2
, ipopt
, Accelerate
# tests take an hour to build on a 48-core machine
, runTests ? false
, enablePython ? false
, python3Packages
}:
stdenv.mkDerivation rec {
pname = "openturns";
version = "1.22";
src = fetchFromGitHub {
owner = "openturns";
repo = "openturns";
rev = "v${version}";
sha256 = "sha256-ku3/mPoa1YJVJB99R/kWlOubIO+OZAiKfPqS/DrtJQk=";
};
nativeBuildInputs = [ cmake ] ++ lib.optional enablePython python3Packages.sphinx;
buildInputs = [
swig
boost
spectra
libxml2
tbb
hmat-oss
nlopt
cminpack
ceres-solver
dlib
hdf5
primesieve
pagmo2
ipopt
] ++ lib.optionals enablePython [
python3Packages.python
python3Packages.matplotlib
python3Packages.psutil
python3Packages.dill
] ++ lib.optional stdenv.isDarwin Accelerate;
cmakeFlags = [
"-DOPENTURNS_SYSCONFIG_PATH=$out/etc"
"-DCMAKE_UNITY_BUILD=ON"
"-DCMAKE_UNITY_BUILD_BATCH_SIZE=32"
"-DSWIG_COMPILE_FLAGS='-O1'"
"-DUSE_SPHINX=${if enablePython then "ON" else "OFF"}"
"-DBUILD_PYTHON=${if enablePython then "ON" else "OFF"}"
];
doCheck = runTests;
checkTarget = "tests check";
meta = with lib; {
description = "Multivariate probabilistic modeling and uncertainty treatment library";
license = with licenses; [ lgpl3 gpl3 ];
homepage = "https://openturns.github.io/www/";
changelog = "https://github.com/openturns/openturns/raw/v${version}/ChangeLog";
maintainers = with maintainers; [ gdinh ];
platforms = platforms.unix;
};
}

View File

@ -8,7 +8,7 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "rapidcheck"; pname = "rapidcheck";
version = "unstable-2023-12-14"; version = "0-unstable-2023-12-14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "emil-e"; owner = "emil-e";

View File

@ -13,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "airthings-ble"; pname = "airthings-ble";
version = "0.8.0"; version = "0.9.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "vincegio"; owner = "vincegio";
repo = "airthings-ble"; repo = "airthings-ble";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-BgjfvKrVpw/cP93JCloZKq+PIyS/w7/v6+obfgDT64A="; hash = "sha256-920Vgk8kY5NsjYrOGYoRtcdHl4KKO7ytieH8cJ0S3RE=";
}; };
postPatch = '' postPatch = ''
@ -45,7 +45,7 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Library for Airthings BLE devices"; description = "Library for Airthings BLE devices";
homepage = "https://github.com/vincegio/airthings-ble"; homepage = "https://github.com/vincegio/airthings-ble";
changelog = "https://github.com/vincegio/airthings-ble/releases/tag/v${version}"; changelog = "https://github.com/vincegio/airthings-ble/releases/tag/${version}";
license = with licenses; [ mit ]; license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ]; maintainers = with maintainers; [ fab ];
}; };

View File

@ -1,29 +1,33 @@
{ lib {
, buildPythonPackage lib,
, pythonOlder base58,
, fetchPypi buildPythonPackage,
, base58 ecdsa,
, ecdsa fetchPypi,
, hidapi hidapi,
, noiseprotocol noiseprotocol,
, protobuf protobuf,
, semver pythonOlder,
, typing-extensions semver,
setuptools,
typing-extensions,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "bitbox02"; pname = "bitbox02";
version = "6.2.0"; version = "6.3.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-zt4G45nJjtU2/tbYpCEgjaoA+Xtpe9g2OpQaxfMzCb8="; hash = "sha256-0D+yIovlYw8dfDUeW+vcualbvmLs+IySkTpmHwk2meM=";
}; };
propagatedBuildInputs = [ build-system = [ setuptools ];
dependencies = [
base58 base58
ecdsa ecdsa
hidapi hidapi
@ -36,9 +40,7 @@ buildPythonPackage rec {
# does not contain tests # does not contain tests
doCheck = false; doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [ "bitbox02" ];
"bitbox02"
];
meta = with lib; { meta = with lib; {
description = "Firmware code of the BitBox02 hardware wallet"; description = "Firmware code of the BitBox02 hardware wallet";

View File

@ -19,7 +19,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "bluetooth-adapters"; pname = "bluetooth-adapters";
version = "0.19.1"; version = "0.19.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -28,7 +28,7 @@ buildPythonPackage rec {
owner = "Bluetooth-Devices"; owner = "Bluetooth-Devices";
repo = "bluetooth-adapters"; repo = "bluetooth-adapters";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-r+Ll9ODFal+I2MwrwHakPFWD3GiE/n0f/dYs69jmmpU="; hash = "sha256-hPs6YnmndJ2Z5RotcIRIYWPdvMyX56ul84l1Cs8kqH0=";
}; };
postPatch = '' postPatch = ''

View File

@ -366,7 +366,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "boto3-stubs"; pname = "boto3-stubs";
version = "1.34.98"; version = "1.34.99";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -374,7 +374,7 @@ buildPythonPackage rec {
src = fetchPypi { src = fetchPypi {
pname = "boto3_stubs"; pname = "boto3_stubs";
inherit version; inherit version;
hash = "sha256-LhkC5wBmIBa3M5wOwCqCqL+hJ3Dc2Ga1WoWY+A7nNUs="; hash = "sha256-uOVKyGfZ9gzsIhqLtsmyljzj4pcTTxgdQp003UDWGWk=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View File

@ -1,29 +1,30 @@
{ lib {
, buildPythonPackage lib,
, ddt buildPythonPackage,
, fetchFromGitHub ddt,
, importlib-metadata fetchFromGitHub,
, jsonschema importlib-metadata,
, license-expression jsonschema,
, lxml license-expression,
, packageurl-python lxml,
, py-serializable packageurl-python,
, pythonRelaxDepsHook py-serializable,
, poetry-core pythonRelaxDepsHook,
, pytestCheckHook poetry-core,
, pythonOlder pytestCheckHook,
, requirements-parser pythonOlder,
, sortedcontainers requirements-parser,
, setuptools sortedcontainers,
, toml setuptools,
, types-setuptools toml,
, types-toml types-setuptools,
, xmldiff types-toml,
xmldiff,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "cyclonedx-python-lib"; pname = "cyclonedx-python-lib";
version = "6.4.4"; version = "7.3.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -32,15 +33,14 @@ buildPythonPackage rec {
owner = "CycloneDX"; owner = "CycloneDX";
repo = "cyclonedx-python-lib"; repo = "cyclonedx-python-lib";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-PNacp16WZHNblFyA117hSL87IKGMrW0OYNXCSoBoO8Q="; hash = "sha256-z+QBjMT0L7dqCJvbwok9TWQajIPzmAq3XPLWFxmhPsk=";
}; };
nativeBuildInputs = [ build-system = [ poetry-core ];
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [ nativeBuildInputs = [ pythonRelaxDepsHook ];
dependencies = [
importlib-metadata importlib-metadata
license-expression license-expression
packageurl-python packageurl-python
@ -61,21 +61,15 @@ buildPythonPackage rec {
xmldiff xmldiff
]; ];
pythonImportsCheck = [ pythonImportsCheck = [ "cyclonedx" ];
"cyclonedx"
];
pythonRelaxDeps = [ pythonRelaxDeps = [ "py-serializable" ];
"py-serializable"
];
preCheck = '' preCheck = ''
export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH} export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH}
''; '';
pytestFlagsArray = [ pytestFlagsArray = [ "tests/" ];
"tests/"
];
disabledTests = [ disabledTests = [
# These tests require network access # These tests require network access

View File

@ -1,7 +1,7 @@
{ lib { lib
, stdenv , stdenv
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, fetchpatch2 , fetchpatch2
, pythonAtLeast , pythonAtLeast
, pythonOlder , pythonOlder
@ -44,15 +44,16 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "django"; pname = "django";
version = "5.0.4"; version = "5.0.5";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.10"; disabled = pythonOlder "3.10";
src = fetchPypi { src = fetchFromGitHub {
pname = "Django"; owner = "django";
inherit version; repo = "django";
hash = "sha256-S9AajIMLt3qKOw59iyW4h+U2rReoG6Lc5UdhNcczEr0="; rev = "refs/tags/${version}";
hash = "sha256-0/AbPmTl38E9BpHVKs0r79fISjEa1d4XO/se1pA7zxg=";
}; };
patches = [ patches = [
@ -65,13 +66,6 @@ buildPythonPackage rec {
# disable test that excpects timezone issues # disable test that excpects timezone issues
./django_5_disable_failing_tests.patch ./django_5_disable_failing_tests.patch
(fetchpatch2 {
# https://github.com/django/django/pull/17979
name = "django-mime-utf8-surrogates.patch";
url = "https://github.com/django/django/commit/b231bcd19e57267ce1fc21d42d46f0b65fdcfcf8.patch";
hash = "sha256-HhmRwi24VkoPoh+NygAThCoMywoMwrLijU4ZsDfVU34=";
})
] ++ lib.optionals withGdal [ ] ++ lib.optionals withGdal [
(substituteAll { (substituteAll {
src = ./django_5_set_geos_gdal_lib.patch; src = ./django_5_set_geos_gdal_lib.patch;

View File

@ -14,7 +14,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "holidays"; pname = "holidays";
version = "0.47"; version = "0.48";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "vacanza"; owner = "vacanza";
repo = "python-holidays"; repo = "python-holidays";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-A4viSzUia4QBdD0svkqYtsCq/la7Nrf2xu/fVDZHb00="; hash = "sha256-PKa4knEUkULeGbwjEViF2J3QyUOOvKHYxy0ChmRQf6A=";
}; };
build-system = [ build-system = [

View File

@ -8,14 +8,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "meraki"; pname = "meraki";
version = "1.45.0"; version = "1.46.0";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-PBeeohKNzAMlEdAjzB8fsVPc+ml+mcaWHoVWPeP93Bo="; hash = "sha256-f3K+59+9NO33GO1SBZhKfqHPO9p5kivDeLNd780cZu8=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -10,7 +10,7 @@ buildPythonPackage rec {
version = "0.10.0"; version = "0.10.0";
format = "setuptools"; format = "setuptools";
pname = "piep"; pname = "piep";
disabled = isPy3k; disabled = !isPy3k;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;

View File

@ -11,14 +11,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "publicsuffixlist"; pname = "publicsuffixlist";
version = "0.10.0.20240502"; version = "0.10.0.20240506";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-Hy0DmawyjUXn35tTV39Mpp+Xe16hDTbkyQoBdKS/d0o="; hash = "sha256-gg1UcELZ8+gQg4VcBsagHhtUc9i6/d03q9oanyDT6K8=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View File

@ -1,16 +1,17 @@
{ lib {
, buildPythonPackage lib,
, cryptography buildPythonPackage,
, fetchFromGitHub cryptography,
, netifaces fetchFromGitHub,
, pyserial netifaces,
, pythonOlder pyserial,
, setuptools pythonOlder,
setuptools,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "rns"; pname = "rns";
version = "0.7.3"; version = "0.7.4";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -19,14 +20,12 @@ buildPythonPackage rec {
owner = "markqvist"; owner = "markqvist";
repo = "Reticulum"; repo = "Reticulum";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-QcYjqqeXBKx+Ef00Bw1OJMWDMdQgp/fqh3r5yhsa0Kg="; hash = "sha256-M6iI554lv6PF5sIdOoaMIlQHP5YU8WM8YxfHMWhLSdE=";
}; };
nativeBuildInputs = [ build-system = [ setuptools ];
setuptools
];
propagatedBuildInputs = [ dependencies = [
cryptography cryptography
netifaces netifaces
pyserial pyserial
@ -35,9 +34,7 @@ buildPythonPackage rec {
# Module has no tests # Module has no tests
doCheck = false; doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [ "RNS" ];
"RNS"
];
meta = with lib; { meta = with lib; {
description = "Cryptography-based networking stack for wide-area networks"; description = "Cryptography-based networking stack for wide-area networks";

View File

@ -135,6 +135,14 @@ buildPythonPackage rec {
pythonImportsCheck = [ "validator_collection" ]; pythonImportsCheck = [ "validator_collection" ];
disabledTests = [
# Issues with fake filesystem /var/data
"test_writeable"
"test_executable"
"test_readable"
"test_is_readable"
];
meta = with lib; { meta = with lib; {
description = "Python library of 60+ commonly-used validator functions"; description = "Python library of 60+ commonly-used validator functions";
homepage = "https://github.com/insightindustry/validator-collection/"; homepage = "https://github.com/insightindustry/validator-collection/";

View File

@ -23,6 +23,7 @@ python3.pkgs.buildPythonApplication rec {
"bc-python-hcl2" "bc-python-hcl2"
"boto3" "boto3"
"botocore" "botocore"
"cyclonedx-python-lib"
"dpath" "dpath"
"igraph" "igraph"
"license-expression" "license-expression"

View File

@ -8,11 +8,11 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "sbt"; pname = "sbt";
version = "1.9.9"; version = "1.10.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/sbt/sbt/releases/download/v${finalAttrs.version}/sbt-${finalAttrs.version}.tgz"; url = "https://github.com/sbt/sbt/releases/download/v${finalAttrs.version}/sbt-${finalAttrs.version}.tgz";
hash = "sha256-xXyuYMISLKG7p3GE37TQ0l/GwYgFOUqzarYgiwwPJi8="; hash = "sha256-FUt95sGSB8c9CjBPkByMS26tmpw6mamKnXKsGUGdJkA=";
}; };
postPatch = '' postPatch = ''

View File

@ -1,4 +1,11 @@
{ lib, stdenv, linuxHeaders, freebsd, runCommandCC, buildPackages }: {
lib,
stdenv,
linuxHeaders,
freebsd,
runCommandCC,
buildPackages,
}:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "evdev-proto"; pname = "evdev-proto";
@ -28,7 +35,7 @@ stdenv.mkDerivation {
TOUCH = "touch"; TOUCH = "touch";
XARGS = "xargs"; XARGS = "xargs";
ABI_FILE = runCommandCC "abifile" {} "$CC -shared -o $out"; ABI_FILE = runCommandCC "abifile" { } "$CC -shared -o $out";
CLEAN_FETCH_ENV = true; CLEAN_FETCH_ENV = true;
INSTALL_AS_USER = true; INSTALL_AS_USER = true;
NO_CHECKSUM = true; NO_CHECKSUM = true;

View File

@ -3,14 +3,16 @@
{ {
inherit version; inherit version;
mkBsdArch = stdenv': { mkBsdArch =
x86_64 = "amd64"; stdenv':
aarch64 = "arm64"; {
i486 = "i386"; x86_64 = "amd64";
i586 = "i386"; aarch64 = "arm64";
i686 = "i386"; i486 = "i386";
}.${stdenv'.hostPlatform.parsed.cpu.name} i586 = "i386";
or stdenv'.hostPlatform.parsed.cpu.name; i686 = "i386";
}
.${stdenv'.hostPlatform.parsed.cpu.name} or stdenv'.hostPlatform.parsed.cpu.name;
install-wrapper = builtins.readFile ./install-wrapper.sh; install-wrapper = builtins.readFile ./install-wrapper.sh;
} }

View File

@ -1,6 +1,12 @@
{ stdenv, lib, stdenvNoCC {
, fetchzip stdenv,
, sourceData, versionData, buildFreebsd, patchesRoot lib,
stdenvNoCC,
fetchzip,
sourceData,
versionData,
buildFreebsd,
patchesRoot,
}: }:
self: self:
@ -8,7 +14,8 @@ self:
lib.packagesFromDirectoryRecursive { lib.packagesFromDirectoryRecursive {
callPackage = self.callPackage; callPackage = self.callPackage;
directory = ./pkgs; directory = ./pkgs;
} // { }
// {
inherit sourceData patchesRoot versionData; inherit sourceData patchesRoot versionData;
# Keep the crawled portion of Nixpkgs finite. # Keep the crawled portion of Nixpkgs finite.
@ -21,11 +28,15 @@ lib.packagesFromDirectoryRecursive {
compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isFreeBSD) self.compat; compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isFreeBSD) self.compat;
freebsd-lib = import ./lib { freebsd-lib = import ./lib {
version = lib.concatStringsSep "." (map toString (lib.filter (x: x != null) [ version = lib.concatStringsSep "." (
self.versionData.major map toString (
self.versionData.minor lib.filter (x: x != null) [
self.versionData.patch or null self.versionData.major
])); self.versionData.minor
self.versionData.patch or null
]
)
);
}; };
# The manual callPackages below should in principle be unnecessary, but are # The manual callPackages below should in principle be unnecessary, but are
@ -51,21 +62,21 @@ lib.packagesFromDirectoryRecursive {
}; };
libc = self.callPackage ./pkgs/libc/package.nix { libc = self.callPackage ./pkgs/libc/package.nix {
inherit (buildFreebsd) makeMinimal install gencat rpcgen; inherit (buildFreebsd)
makeMinimal
install
gencat
rpcgen
;
inherit (self) csu include; inherit (self) csu include;
}; };
libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix { inherit (buildFreebsd) makeMinimal; };
inherit (buildFreebsd) makeMinimal;
};
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
inherit stdenv; inherit stdenv;
inherit (buildFreebsd) makeMinimal install tsort; inherit (buildFreebsd) makeMinimal install tsort;
}; };
makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
inherit (self) make;
};
} }

View File

@ -1,7 +1,10 @@
{ buildPackages, freebsd-lib }: { buildPackages, freebsd-lib }:
# Wrap NetBSD's install # Wrap NetBSD's install
buildPackages.writeShellScriptBin "boot-install" (freebsd-lib.install-wrapper + '' buildPackages.writeShellScriptBin "boot-install" (
freebsd-lib.install-wrapper
+ ''
${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}" ${buildPackages.netbsd.install}/bin/xinstall "''${args[@]}"
'') ''
)

View File

@ -1,9 +1,16 @@
{ lib, stdenv, mkDerivation, patchesRoot {
, bsdSetupHook, freebsdSetupHook lib,
, makeMinimal, boot-install stdenv,
, which mkDerivation,
, freebsd-lib patchesRoot,
, expat, zlib, bsdSetupHook,
freebsdSetupHook,
makeMinimal,
boot-install,
which,
freebsd-lib,
expat,
zlib,
}: }:
let let
@ -13,90 +20,95 @@ in
mkDerivation rec { mkDerivation rec {
pname = "compat"; pname = "compat";
path = "tools/build"; path = "tools/build";
extraPaths = [ extraPaths =
"lib/libc/db" [
"lib/libc/stdlib" # getopt "lib/libc/db"
"lib/libc/gen" # getcap "lib/libc/stdlib" # getopt
"lib/libc/locale" # rpmatch "lib/libc/gen" # getcap
] ++ lib.optionals stdenv.hostPlatform.isLinux [ "lib/libc/locale" # rpmatch
"lib/libc/string" # strlcpy ]
"lib/libutil" ++ lib.optionals stdenv.hostPlatform.isLinux [
] ++ [ "lib/libc/string" # strlcpy
"contrib/libc-pwcache" "lib/libutil"
"contrib/libc-vis" ]
"sys/libkern" ++ [
"sys/kern/subr_capability.c" "contrib/libc-pwcache"
"contrib/libc-vis"
"sys/libkern"
"sys/kern/subr_capability.c"
# Take only individual headers, or else we will clobber native libc, etc. # Take only individual headers, or else we will clobber native libc, etc.
"sys/rpc/types.h" "sys/rpc/types.h"
# Listed in Makekfile as INC # Listed in Makekfile as INC
"include/mpool.h" "include/mpool.h"
"include/ndbm.h" "include/ndbm.h"
"include/err.h" "include/err.h"
"include/stringlist.h" "include/stringlist.h"
"include/a.out.h" "include/a.out.h"
"include/nlist.h" "include/nlist.h"
"include/db.h" "include/db.h"
"include/getopt.h" "include/getopt.h"
"include/nl_types.h" "include/nl_types.h"
"include/elf.h" "include/elf.h"
"sys/sys/ctf.h" "sys/sys/ctf.h"
# Listed in Makekfile as SYSINC # Listed in Makekfile as SYSINC
"sys/sys/capsicum.h" "sys/sys/capsicum.h"
"sys/sys/caprights.h" "sys/sys/caprights.h"
"sys/sys/imgact_aout.h" "sys/sys/imgact_aout.h"
"sys/sys/nlist_aout.h" "sys/sys/nlist_aout.h"
"sys/sys/nv.h" "sys/sys/nv.h"
"sys/sys/dnv.h" "sys/sys/dnv.h"
"sys/sys/cnv.h" "sys/sys/cnv.h"
"sys/sys/elf32.h" "sys/sys/elf32.h"
"sys/sys/elf64.h" "sys/sys/elf64.h"
"sys/sys/elf_common.h" "sys/sys/elf_common.h"
"sys/sys/elf_generic.h" "sys/sys/elf_generic.h"
"sys/${mkBsdArch stdenv}/include" "sys/${mkBsdArch stdenv}/include"
] ++ lib.optionals stdenv.hostPlatform.isx86 [ ]
"sys/x86/include" ++ lib.optionals stdenv.hostPlatform.isx86 [ "sys/x86/include" ]
] ++ [ ++ [
"sys/sys/queue.h" "sys/sys/queue.h"
"sys/sys/md5.h" "sys/sys/md5.h"
"sys/sys/sbuf.h" "sys/sys/sbuf.h"
"sys/sys/tree.h" "sys/sys/tree.h"
"sys/sys/font.h" "sys/sys/font.h"
"sys/sys/consio.h" "sys/sys/consio.h"
"sys/sys/fnv_hash.h" "sys/sys/fnv_hash.h"
"sys/crypto/chacha20/_chacha.h" "sys/crypto/chacha20/_chacha.h"
"sys/crypto/chacha20/chacha.h" "sys/crypto/chacha20/chacha.h"
# included too, despite ".c" # included too, despite ".c"
"sys/crypto/chacha20/chacha.c" "sys/crypto/chacha20/chacha.c"
"sys/fs" "sys/fs"
"sys/ufs" "sys/ufs"
"sys/sys/disk" "sys/sys/disk"
"lib/libcapsicum" "lib/libcapsicum"
"lib/libcasper" "lib/libcasper"
]; ];
patches = [ patches = [
/${patchesRoot}/compat-install-dirs.patch /${patchesRoot}/compat-install-dirs.patch
/${patchesRoot}/compat-fix-typedefs-locations.patch /${patchesRoot}/compat-fix-typedefs-locations.patch
]; ];
preBuild = '' preBuild =
NIX_CFLAGS_COMPILE+=' -I../../include -I../../sys' ''
NIX_CFLAGS_COMPILE+=' -I../../include -I../../sys'
cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys
cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys/${mkBsdArch stdenv} cp ../../sys/${mkBsdArch stdenv}/include/elf.h ../../sys/sys/${mkBsdArch stdenv}
'' + lib.optionalString stdenv.hostPlatform.isx86 '' ''
cp ../../sys/x86/include/elf.h ../../sys/x86 + lib.optionalString stdenv.hostPlatform.isx86 ''
''; cp ../../sys/x86/include/elf.h ../../sys/x86
'';
setupHooks = [ setupHooks = [
../../../../../build-support/setup-hooks/role.bash ../../../../../build-support/setup-hooks/role.bash
@ -109,13 +121,17 @@ mkDerivation rec {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
makeMinimal makeMinimal
boot-install boot-install
which which
]; ];
buildInputs = [ expat zlib ]; buildInputs = [
expat
zlib
];
makeFlags = [ makeFlags = [
"STRIP=-s" # flag to install, not command "STRIP=-s" # flag to install, not command
@ -124,12 +140,15 @@ mkDerivation rec {
"INSTALL=boot-install" "INSTALL=boot-install"
]; ];
preIncludes = '' preIncludes =
mkdir -p $out/{0,1}-include ''
cp --no-preserve=mode -r cross-build/include/common/* $out/0-include mkdir -p $out/{0,1}-include
'' + lib.optionalString stdenv.hostPlatform.isLinux '' cp --no-preserve=mode -r cross-build/include/common/* $out/0-include
cp --no-preserve=mode -r cross-build/include/linux/* $out/1-include ''
'' + lib.optionalString stdenv.hostPlatform.isDarwin '' + lib.optionalString stdenv.hostPlatform.isLinux ''
cp --no-preserve=mode -r cross-build/include/darwin/* $out/1-include cp --no-preserve=mode -r cross-build/include/linux/* $out/1-include
''; ''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
cp --no-preserve=mode -r cross-build/include/darwin/* $out/1-include
'';
} }

View File

@ -1,17 +1,35 @@
{ mkDerivation {
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal, install, mandoc, groff bsdSetupHook,
, flex, byacc, file2c freebsdSetupHook,
, compatIfNeeded, libnv, libsbuf makeMinimal,
install,
mandoc,
groff,
flex,
byacc,
file2c,
compatIfNeeded,
libnv,
libsbuf,
}: }:
mkDerivation { mkDerivation {
path = "usr.sbin/config"; path = "usr.sbin/config";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
flex byacc file2c flex
byacc
file2c
];
buildInputs = compatIfNeeded ++ [
libnv
libsbuf
]; ];
buildInputs = compatIfNeeded ++ [ libnv libsbuf ];
} }

View File

@ -1,9 +1,14 @@
{ lib, mkDerivation {
, bsdSetupHook, freebsdSetupHook lib,
, makeMinimal mkDerivation,
, install bsdSetupHook,
, flex, byacc, gencat freebsdSetupHook,
, include makeMinimal,
install,
flex,
byacc,
gencat,
include,
}: }:
mkDerivation { mkDerivation {
@ -13,11 +18,14 @@ mkDerivation {
"lib/libc/include/libc_private.h" "lib/libc/include/libc_private.h"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
makeMinimal makeMinimal
install install
flex byacc gencat flex
byacc
gencat
]; ];
buildInputs = [ include ]; buildInputs = [ include ];
MK_TESTS = "no"; MK_TESTS = "no";

View File

@ -1,7 +1,18 @@
{ lib, stdenv, mkDerivation {
, bsdSetupHook, freebsdSetupHook lib,
, makeMinimal, install, mandoc, groff stdenv,
, compatIfNeeded, libelf, libdwarf, zlib, libspl mkDerivation,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
compatIfNeeded,
libelf,
libdwarf,
zlib,
libspl,
}: }:
mkDerivation { mkDerivation {
@ -16,13 +27,20 @@ mkDerivation {
OPENSOLARIS_USR_DISTDIR = "$(SRCTOP)/cddl/contrib/opensolaris"; OPENSOLARIS_USR_DISTDIR = "$(SRCTOP)/cddl/contrib/opensolaris";
OPENSOLARIS_SYS_DISTDIR = "$(SRCTOP)/sys/cddl/contrib/opensolaris"; OPENSOLARIS_SYS_DISTDIR = "$(SRCTOP)/sys/cddl/contrib/opensolaris";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
# flex byacc file2c # flex byacc file2c
]; ];
buildInputs = compatIfNeeded ++ [ buildInputs = compatIfNeeded ++ [
libelf libdwarf zlib libspl libelf
libdwarf
zlib
libspl
]; ];
meta.license = lib.licenses.cddl; meta.license = lib.licenses.cddl;
} }

View File

@ -1,5 +1,3 @@
{ makeSetupHook }: { makeSetupHook }:
makeSetupHook { makeSetupHook { name = "freebsd-setup-hook"; } ./setup-hook.sh
name = "freebsd-setup-hook";
} ./setup-hook.sh

View File

@ -1,5 +1,3 @@
{ mkDerivation }: { mkDerivation }:
mkDerivation { mkDerivation { path = "usr.bin/gencat"; }
path = "usr.bin/gencat";
}

View File

@ -1,9 +1,16 @@
{ lib, mkDerivation, patchesRoot {
, buildPackages lib,
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal patchesRoot,
, install buildPackages,
, mandoc, groff, rsync /*, nbperf*/, rpcgen bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
rsync, # , nbperf
rpcgen,
}: }:
mkDerivation { mkDerivation {
@ -15,19 +22,21 @@ mkDerivation {
"sys" "sys"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
makeMinimal makeMinimal
install install
mandoc groff rsync /*nbperf*/ rpcgen mandoc
groff
rsync # nbperf
rpcgen
# HACK use NetBSD's for now # HACK use NetBSD's for now
buildPackages.netbsd.mtree buildPackages.netbsd.mtree
]; ];
patches = [ patches = [ /${patchesRoot}/no-perms-BSD.include.dist.patch ];
/${patchesRoot}/no-perms-BSD.include.dist.patch
];
# The makefiles define INCSDIR per subdirectory, so we have to set # The makefiles define INCSDIR per subdirectory, so we have to set
# something else on the command line so those definitions aren't # something else on the command line so those definitions aren't
@ -39,9 +48,7 @@ mkDerivation {
{} \; {} \;
''; '';
makeFlags = [ makeFlags = [ "RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp" ];
"RPCGEN_CPP=${buildPackages.stdenv.cc.cc}/bin/cpp"
];
# multiple header dirs, see above # multiple header dirs, see above
postConfigure = '' postConfigure = ''

View File

@ -1,31 +1,49 @@
{ lib, stdenv, mkDerivation, writeShellScript {
, freebsd-lib lib,
, mtree stdenv,
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal, mandoc, groff writeShellScript,
, boot-install, install freebsd-lib,
, compatIfNeeded, libmd, libnetbsd mtree,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
mandoc,
groff,
boot-install,
install,
compatIfNeeded,
libmd,
libnetbsd,
}: }:
# HACK: to ensure parent directories exist. This emulates GNU # HACK: to ensure parent directories exist. This emulates GNU
# installs -D option. No alternative seems to exist in BSD install. # installs -D option. No alternative seems to exist in BSD install.
let let
binstall = writeShellScript "binstall" (freebsd-lib.install-wrapper + '' binstall = writeShellScript "binstall" (
freebsd-lib.install-wrapper
+ ''
@out@/bin/xinstall "''${args[@]}" @out@/bin/xinstall "''${args[@]}"
''); ''
in mkDerivation { );
in
mkDerivation {
path = "usr.bin/xinstall"; path = "usr.bin/xinstall";
extraPaths = [ mtree.path ]; extraPaths = [ mtree.path ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal mandoc groff freebsdSetupHook
(if stdenv.hostPlatform == stdenv.buildPlatform makeMinimal
then boot-install mandoc
else install) groff
(if stdenv.hostPlatform == stdenv.buildPlatform then boot-install else install)
]; ];
skipIncludesPhase = true; skipIncludesPhase = true;
buildInputs = compatIfNeeded ++ [ libmd libnetbsd ]; buildInputs = compatIfNeeded ++ [
libmd
libnetbsd
];
makeFlags = [ makeFlags = [
"STRIP=-s" # flag to install, not command "STRIP=-s" # flag to install, not command
"MK_WERROR=no" "MK_WERROR=no"
@ -37,5 +55,9 @@ in mkDerivation {
mv $out/bin/install $out/bin/xinstall mv $out/bin/install $out/bin/xinstall
ln -s ./binstall $out/bin/install ln -s ./binstall $out/bin/install
''; '';
outputs = [ "out" "man" "test" ]; outputs = [
"out"
"man"
"test"
];
} }

View File

@ -1,12 +1,20 @@
{ lib, stdenv, mkDerivation {
, patchesRoot lib,
stdenv,
mkDerivation,
patchesRoot,
, bsdSetupHook, freebsdSetupHook bsdSetupHook,
, makeMinimal freebsdSetupHook,
, install makeMinimal,
, flex, byacc, gencat, rpcgen install,
flex,
byacc,
gencat,
rpcgen,
, csu, include csu,
include,
}: }:
mkDerivation rec { mkDerivation rec {
@ -63,13 +71,20 @@ mkDerivation rec {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
makeMinimal makeMinimal
install install
flex byacc gencat rpcgen flex
byacc
gencat
rpcgen
];
buildInputs = [
include
csu
]; ];
buildInputs = [ include csu ];
env.NIX_CFLAGS_COMPILE = "-B${csu}/lib"; env.NIX_CFLAGS_COMPILE = "-B${csu}/lib";
# Suppress lld >= 16 undefined version errors # Suppress lld >= 16 undefined version errors

View File

@ -1,8 +1,16 @@
{ lib, stdenv, mkDerivation {
, bsdSetupHook, freebsdSetupHook lib,
, makeMinimal, install, mandoc, groff stdenv,
, m4 mkDerivation,
, compatIfNeeded, libelf bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
m4,
compatIfNeeded,
libelf,
}: }:
mkDerivation { mkDerivation {
@ -15,13 +23,15 @@ mkDerivation {
"sys/sys/elf_common.h" "sys/sys/elf_common.h"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
m4 m4
]; ];
buildInputs = compatIfNeeded ++ [ buildInputs = compatIfNeeded ++ [ libelf ];
libelf
];
MK_TESTS = "no"; MK_TESTS = "no";
} }

View File

@ -1,7 +1,14 @@
{ lib, stdenv, mkDerivation {
, bsdSetupHook, freebsdSetupHook lib,
, makeMinimal, install, mandoc, groff stdenv,
, m4 mkDerivation,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
m4,
}: }:
mkDerivation { mkDerivation {
@ -15,8 +22,12 @@ mkDerivation {
]; ];
BOOTSTRAPPING = !stdenv.isFreeBSD; BOOTSTRAPPING = !stdenv.isFreeBSD;
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
m4 m4
]; ];

View File

@ -1,18 +1,27 @@
{ lib, stdenv {
, mkDerivation, patchesRoot lib,
, bsdSetupHook, freebsdSetupHook, makeMinimal, mandoc, groff stdenv,
, boot-install, install mkDerivation,
, compatIfNeeded patchesRoot,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
mandoc,
groff,
boot-install,
install,
compatIfNeeded,
}: }:
mkDerivation { mkDerivation {
path = "lib/libnetbsd"; path = "lib/libnetbsd";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal mandoc groff freebsdSetupHook
(if stdenv.hostPlatform == stdenv.buildPlatform makeMinimal
then boot-install mandoc
else install) groff
(if stdenv.hostPlatform == stdenv.buildPlatform then boot-install else install)
]; ];
patches = lib.optionals (!stdenv.hostPlatform.isFreeBSD) [ patches = lib.optionals (!stdenv.hostPlatform.isFreeBSD) [
/${patchesRoot}/libnetbsd-do-install.patch /${patchesRoot}/libnetbsd-do-install.patch

View File

@ -2,8 +2,6 @@
mkDerivation { mkDerivation {
path = "lib/libsbuf"; path = "lib/libsbuf";
extraPaths = [ extraPaths = [ "sys/kern" ];
"sys/kern"
];
MK_TESTS = "no"; MK_TESTS = "no";
} }

View File

@ -1,7 +1,11 @@
{ mkDerivation, lib, stdenv }: {
mkDerivation,
lib,
stdenv,
}:
mkDerivation { mkDerivation {
path = "lib/libutil"; path = "lib/libutil";
extraPaths = ["lib/libc/gen"]; extraPaths = [ "lib/libc/gen" ];
clangFixup = true; clangFixup = true;
MK_TESTS = "no"; MK_TESTS = "no";
} }

View File

@ -1,5 +1,7 @@
{ mkDerivation {
, bsdSetupHook, freebsdSetupHook mkDerivation,
bsdSetupHook,
freebsdSetupHook,
}: }:
mkDerivation rec { mkDerivation rec {
@ -13,8 +15,12 @@ mkDerivation rec {
mv "lorder.1" "$man/share/man" mv "lorder.1" "$man/share/man"
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
];
buildInputs = [ ];
outputs = [
"out"
"man"
]; ];
buildInputs = [];
outputs = [ "out" "man" ];
} }

View File

@ -1,20 +1,25 @@
{ lib, mkDerivation, stdenv }: {
lib,
mkDerivation,
stdenv,
}:
mkDerivation { mkDerivation {
path = "contrib/bmake"; path = "contrib/bmake";
version = "9.2"; version = "9.2";
postPatch = '' postPatch =
# make needs this to pick up our sys make files ''
export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" # make needs this to pick up our sys make files
export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\""
'' + lib.optionalString stdenv.isDarwin '' ''
substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ + lib.optionalString stdenv.isDarwin ''
--replace '-Wl,--fatal-warnings' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \
--replace '-Wl,--warn-shared-textrel' "" --replace '-Wl,--fatal-warnings' "" \
''; --replace '-Wl,--warn-shared-textrel' ""
'';
postInstall = '' postInstall = ''
make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install
''; '';
extraPaths = [ "share/mk" ] extraPaths = [ "share/mk" ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "tools/build/mk";
++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "tools/build/mk";
} }

View File

@ -1,19 +1,24 @@
{ lib, stdenv, mkDerivation {
, make lib,
, bsdSetupHook, freebsdSetupHook stdenv,
mkDerivation,
make,
bsdSetupHook,
freebsdSetupHook,
}: }:
mkDerivation rec { mkDerivation rec {
inherit (make) path; inherit (make) path;
buildInputs = []; buildInputs = [ ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
freebsdSetupHook
]; ];
skipIncludesPhase = true; skipIncludesPhase = true;
makeFlags = []; makeFlags = [ ];
postPatch = '' postPatch = ''
patchShebangs configure patchShebangs configure

View File

@ -1,78 +1,99 @@
{ lib, stdenv, stdenvNoCC {
, compatIfNeeded lib,
, runCommand, rsync stdenv,
, freebsd-lib stdenvNoCC,
, source compatIfNeeded,
, bsdSetupHook, freebsdSetupHook runCommand,
, makeMinimal rsync,
, install, tsort, lorder, mandoc, groff freebsd-lib,
source,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
tsort,
lorder,
mandoc,
groff,
}: }:
lib.makeOverridable (attrs: let lib.makeOverridable (
stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv; attrs:
in stdenv'.mkDerivation (rec { let
pname = "${attrs.pname or (baseNameOf attrs.path)}-freebsd"; stdenv' = if attrs.noCC or false then stdenvNoCC else stdenv;
inherit (freebsd-lib) version; in
src = runCommand "${pname}-filtered-src" { stdenv'.mkDerivation (
nativeBuildInputs = [ rsync ]; rec {
} '' pname = "${attrs.pname or (baseNameOf attrs.path)}-freebsd";
for p in ${lib.concatStringsSep " " ([ attrs.path ] ++ attrs.extraPaths or [])}; do inherit (freebsd-lib) version;
set -x src = runCommand "${pname}-filtered-src" { nativeBuildInputs = [ rsync ]; } ''
path="$out/$p" for p in ${lib.concatStringsSep " " ([ attrs.path ] ++ attrs.extraPaths or [ ])}; do
mkdir -p "$(dirname "$path")" set -x
src_path="${source}/$p" path="$out/$p"
if [[ -d "$src_path" ]]; then src_path+=/; fi mkdir -p "$(dirname "$path")"
rsync --chmod="+w" -r "$src_path" "$path" src_path="${source}/$p"
set +x if [[ -d "$src_path" ]]; then src_path+=/; fi
done rsync --chmod="+w" -r "$src_path" "$path"
''; set +x
done
'';
extraPaths = [ ]; extraPaths = [ ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal freebsdSetupHook
install tsort lorder mandoc groff #statHook makeMinimal
]; install
buildInputs = compatIfNeeded; tsort
lorder
mandoc
groff # statHook
];
buildInputs = compatIfNeeded;
HOST_SH = stdenv'.shell; HOST_SH = stdenv'.shell;
# Since STRIP below is the flag # Since STRIP below is the flag
STRIPBIN = "${stdenv.cc.bintools.targetPrefix}strip"; STRIPBIN = "${stdenv.cc.bintools.targetPrefix}strip";
makeFlags = [ makeFlags = [
"STRIP=-s" # flag to install, not command "STRIP=-s" # flag to install, not command
] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no"; ] ++ lib.optional (!stdenv.hostPlatform.isFreeBSD) "MK_WERROR=no";
# amd64 not x86_64 for this on unlike NetBSD # amd64 not x86_64 for this on unlike NetBSD
MACHINE_ARCH = freebsd-lib.mkBsdArch stdenv'; MACHINE_ARCH = freebsd-lib.mkBsdArch stdenv';
MACHINE = freebsd-lib.mkBsdArch stdenv'; MACHINE = freebsd-lib.mkBsdArch stdenv';
MACHINE_CPUARCH = MACHINE_ARCH; MACHINE_CPUARCH = MACHINE_ARCH;
COMPONENT_PATH = attrs.path or null; COMPONENT_PATH = attrs.path or null;
strictDeps = true; strictDeps = true;
meta = with lib; { meta = with lib; {
maintainers = with maintainers; [ ericson2314 ]; maintainers = with maintainers; [ ericson2314 ];
platforms = platforms.unix; platforms = platforms.unix;
license = licenses.bsd2; license = licenses.bsd2;
}; };
} // lib.optionalAttrs stdenv'.hasCC { }
# TODO should CC wrapper set this? // lib.optionalAttrs stdenv'.hasCC {
CPP = "${stdenv'.cc.targetPrefix}cpp"; # TODO should CC wrapper set this?
} // lib.optionalAttrs stdenv'.isDarwin { CPP = "${stdenv'.cc.targetPrefix}cpp";
MKRELRO = "no"; }
} // lib.optionalAttrs (stdenv'.cc.isClang or false) { // lib.optionalAttrs stdenv'.isDarwin { MKRELRO = "no"; }
HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc); // lib.optionalAttrs (stdenv'.cc.isClang or false) {
} // lib.optionalAttrs (stdenv'.cc.isGNU or false) { HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc);
HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc); }
} // lib.optionalAttrs (stdenv'.isx86_32) { // lib.optionalAttrs (stdenv'.cc.isGNU or false) {
USE_SSP = "no"; HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc);
} // lib.optionalAttrs (attrs.headersOnly or false) { }
installPhase = "includesPhase"; // lib.optionalAttrs (stdenv'.isx86_32) { USE_SSP = "no"; }
dontBuild = true; // lib.optionalAttrs (attrs.headersOnly or false) {
} // attrs)) installPhase = "includesPhase";
dontBuild = true;
}
// attrs
)
)

View File

@ -1,5 +1,3 @@
{ mkDerivation }: { mkDerivation }:
mkDerivation { mkDerivation { path = "sbin/mknod"; }
path = "sbin/mknod";
}

View File

@ -1,4 +1,9 @@
{ lib, mkDerivation, stdenv, patchesRoot }: {
lib,
mkDerivation,
stdenv,
patchesRoot,
}:
mkDerivation rec { mkDerivation rec {
path = "usr.bin/rpcgen"; path = "usr.bin/rpcgen";

View File

@ -1,13 +1,22 @@
{ mkDerivation {
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal, install, mandoc, groff bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
}: }:
# Don't add this to nativeBuildInputs directly. Use statHook instead. # Don't add this to nativeBuildInputs directly. Use statHook instead.
mkDerivation { mkDerivation {
path = "usr.bin/stat"; path = "usr.bin/stat";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
]; ];
} }

View File

@ -1,12 +1,16 @@
{ makeSetupHook, writeText, stat }: {
makeSetupHook,
writeText,
stat,
}:
# stat isn't in POSIX, and NetBSD stat supports a completely # stat isn't in POSIX, and NetBSD stat supports a completely
# different range of flags than GNU stat, so including it in PATH # different range of flags than GNU stat, so including it in PATH
# breaks stdenv. Work around that with a hook that will point # breaks stdenv. Work around that with a hook that will point
# NetBSD's build system and NetBSD stat without including it in # NetBSD's build system and NetBSD stat without including it in
# PATH. # PATH.
makeSetupHook { makeSetupHook { name = "netbsd-stat-hook"; } (
name = "netbsd-stat-hook"; writeText "netbsd-stat-hook-impl" ''
} (writeText "netbsd-stat-hook-impl" '' makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat)
makeFlagsArray+=(TOOL_STAT=${stat}/bin/stat) ''
'') )

View File

@ -1,67 +1,92 @@
{ stdenv, mkDerivation, freebsd-lib, patchesRoot {
, buildPackages stdenv,
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal, install, mandoc, groff freebsd-lib,
, config, rpcgen, file2c, gawk, uudecode, xargs-j #, ctfconvert patchesRoot,
buildPackages,
bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
config,
rpcgen,
file2c,
gawk,
uudecode,
xargs-j, # , ctfconvert
}: }:
mkDerivation (let mkDerivation (
cfg = "MINIMAL"; let
in rec { cfg = "MINIMAL";
path = "sys"; in
rec {
path = "sys";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
config rpcgen file2c gawk uudecode xargs-j config
#ctfconvert rpcgen
]; file2c
gawk
uudecode
xargs-j
#ctfconvert
];
patches = [ patches = [
/${patchesRoot}/sys-gnu-date.patch /${patchesRoot}/sys-gnu-date.patch
/${patchesRoot}/sys-no-explicit-intrinsics-dep.patch /${patchesRoot}/sys-no-explicit-intrinsics-dep.patch
]; ];
# --dynamic-linker /red/herring is used when building the kernel. # --dynamic-linker /red/herring is used when building the kernel.
NIX_ENFORCE_PURITY = 0; NIX_ENFORCE_PURITY = 0;
AWK = "${buildPackages.gawk}/bin/awk"; AWK = "${buildPackages.gawk}/bin/awk";
CWARNEXTRA = "-Wno-error=shift-negative-value -Wno-address-of-packed-member"; CWARNEXTRA = "-Wno-error=shift-negative-value -Wno-address-of-packed-member";
MK_CTF = "no"; MK_CTF = "no";
KODIR = "${builtins.placeholder "out"}/kernel"; KODIR = "${builtins.placeholder "out"}/kernel";
KMODDIR = "${builtins.placeholder "out"}/kernel"; KMODDIR = "${builtins.placeholder "out"}/kernel";
DTBDIR = "${builtins.placeholder"out"}/dbt"; DTBDIR = "${builtins.placeholder "out"}/dbt";
KERN_DEBUGDIR = "${builtins.placeholder "out"}/debug"; KERN_DEBUGDIR = "${builtins.placeholder "out"}/debug";
KERN_DEBUGDIR_KODIR = "${KERN_DEBUGDIR}/kernel"; KERN_DEBUGDIR_KODIR = "${KERN_DEBUGDIR}/kernel";
KERN_DEBUGDIR_KMODDIR = "${KERN_DEBUGDIR}/kernel"; KERN_DEBUGDIR_KMODDIR = "${KERN_DEBUGDIR}/kernel";
skipIncludesPhase = true; skipIncludesPhase = true;
configurePhase = '' configurePhase = ''
runHook preConfigure runHook preConfigure
for f in conf/kmod.mk contrib/dev/acpica/acpica_prep.sh; do for f in conf/kmod.mk contrib/dev/acpica/acpica_prep.sh; do
substituteInPlace "$f" --replace 'xargs -J' 'xargs-j ' substituteInPlace "$f" --replace 'xargs -J' 'xargs-j '
done done
for f in conf/*.mk; do for f in conf/*.mk; do
substituteInPlace "$f" --replace 'KERN_DEBUGDIR}''${' 'KERN_DEBUGDIR_' substituteInPlace "$f" --replace 'KERN_DEBUGDIR}''${' 'KERN_DEBUGDIR_'
done done
cd ${freebsd-lib.mkBsdArch stdenv}/conf cd ${freebsd-lib.mkBsdArch stdenv}/conf
sed -i ${cfg} \ sed -i ${cfg} \
-e 's/WITH_CTF=1/WITH_CTF=0/' \ -e 's/WITH_CTF=1/WITH_CTF=0/' \
-e '/KDTRACE/d' -e '/KDTRACE/d'
config ${cfg} config ${cfg}
runHook postConfigure runHook postConfigure
''; '';
preBuild = '' preBuild = ''
cd ../compile/${cfg} cd ../compile/${cfg}
''; '';
}) }
)

View File

@ -1,12 +1,21 @@
{ mkDerivation {
, bsdSetupHook, freebsdSetupHook mkDerivation,
, makeMinimal, install, mandoc, groff bsdSetupHook,
freebsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
}: }:
mkDerivation { mkDerivation {
path = "usr.bin/tsort"; path = "usr.bin/tsort";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook freebsdSetupHook bsdSetupHook
makeMinimal install mandoc groff freebsdSetupHook
makeMinimal
install
mandoc
groff
]; ];
} }

View File

@ -1,137 +1,187 @@
{ stdenv, lib, stdenvNoCC {
, makeScopeWithSplicing', generateSplicesForMkScope stdenv,
, buildPackages lib,
, fetchcvs stdenvNoCC,
makeScopeWithSplicing',
generateSplicesForMkScope,
buildPackages,
fetchcvs,
}: }:
makeScopeWithSplicing' { makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "netbsd"; otherSplices = generateSplicesForMkScope "netbsd";
f = (self: lib.packagesFromDirectoryRecursive { f = (
callPackage = self.callPackage; self:
directory = ./pkgs; lib.packagesFromDirectoryRecursive {
} // (let inherit (self) mkDerivation; in { callPackage = self.callPackage;
directory = ./pkgs;
}
// {
fetchNetBSD = path: version: sha256: fetchcvs { fetchNetBSD =
cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot"; path: version: sha256:
module = "src/${path}"; fetchcvs {
inherit sha256; cvsRoot = ":pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot";
tag = "netbsd-${lib.replaceStrings ["."] ["-"] version}-RELEASE"; module = "src/${path}";
}; inherit sha256;
tag = "netbsd-${lib.replaceStrings [ "." ] [ "-" ] version}-RELEASE";
};
defaultMakeFlags = [ defaultMakeFlags = [
"MKSOFTFLOAT=${if stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" "MKSOFTFLOAT=${
then "yes" if stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft" then
else "no"}" "yes"
]; else
"no"
}"
];
compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat; compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isNetBSD) self.compat;
# The manual callPackages below should in principle be unnecessary because # The manual callPackages below should in principle be unnecessary because
# they're just selecting arguments that would be selected anyway. However, # they're just selecting arguments that would be selected anyway. However,
# if we don't perform these manual calls, we get infinite recursion issues # if we don't perform these manual calls, we get infinite recursion issues
# because of the splices. # because of the splices.
mkDerivation = self.callPackage ./pkgs/mkDerivation.nix { mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
inherit stdenv stdenvNoCC; inherit stdenv stdenvNoCC;
inherit (buildPackages.netbsd) netbsdSetupHook makeMinimal install tsort lorder; inherit (buildPackages.netbsd)
inherit (buildPackages) mandoc; netbsdSetupHook
inherit (buildPackages.buildPackages) rsync; makeMinimal
install
tsort
lorder
;
inherit (buildPackages) mandoc;
inherit (buildPackages.buildPackages) rsync;
};
}; makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { inherit (self) make; };
makeMinimal = self.callPackage ./pkgs/makeMinimal.nix { compat = self.callPackage ./pkgs/compat/package.nix {
inherit (self) make; inherit (buildPackages) coreutils;
}; inherit (buildPackages.darwin) cctools-port;
inherit (buildPackages.buildPackages) rsync;
inherit (buildPackages.netbsd) makeMinimal;
inherit (self)
install
include
libc
libutil
;
};
compat = self.callPackage ./pkgs/compat/package.nix { install = self.callPackage ./pkgs/install/package.nix {
inherit (buildPackages) coreutils; inherit (self)
inherit (buildPackages.darwin) cctools-port; fts
inherit (buildPackages.buildPackages) rsync; mtree
inherit (buildPackages.netbsd) makeMinimal; make
inherit (self) install include libc libutil; compatIfNeeded
}; ;
inherit (buildPackages.buildPackages) rsync;
inherit (buildPackages.netbsd) makeMinimal;
};
install = self.callPackage ./pkgs/install/package.nix { # See note in pkgs/stat/package.nix
inherit (self) fts mtree make compatIfNeeded; stat = self.callPackage ./pkgs/stat/package.nix {
inherit (buildPackages.buildPackages) rsync; inherit (buildPackages.netbsd) makeMinimal install;
inherit (buildPackages.netbsd) makeMinimal; inherit (buildPackages.buildPackages) rsync;
}; };
# See note in pkgs/stat/package.nix # See note in pkgs/stat/hook.nix
stat = self.callPackage ./pkgs/stat/package.nix { statHook = self.callPackage ./pkgs/stat/hook.nix { inherit (self) stat; };
inherit (buildPackages.netbsd) makeMinimal install;
inherit (buildPackages.buildPackages) rsync;
};
# See note in pkgs/stat/hook.nix tsort = self.callPackage ./pkgs/tsort.nix {
statHook = self.callPackage ./pkgs/stat/hook.nix { inherit (buildPackages.netbsd) makeMinimal install;
inherit (self) stat; inherit (buildPackages.buildPackages) rsync;
}; };
tsort = self.callPackage ./pkgs/tsort.nix { lorder = self.callPackage ./pkgs/lorder.nix {
inherit (buildPackages.netbsd) makeMinimal install; inherit (buildPackages.netbsd) makeMinimal install;
inherit (buildPackages.buildPackages) rsync; inherit (buildPackages.buildPackages) rsync;
}; };
lorder = self.callPackage ./pkgs/lorder.nix { config = self.callPackage ./pkgs/config.nix {
inherit (buildPackages.netbsd) makeMinimal install; inherit (buildPackages.netbsd) makeMinimal install;
inherit (buildPackages.buildPackages) rsync; inherit (buildPackages.buildPackages) rsync;
}; inherit (self) cksum;
};
config = self.callPackage ./pkgs/config.nix { include = self.callPackage ./pkgs/include.nix {
inherit (buildPackages.netbsd) makeMinimal install; inherit (buildPackages.netbsd)
inherit (buildPackages.buildPackages) rsync; makeMinimal
inherit (self) cksum; install
}; nbperf
rpcgen
;
inherit (buildPackages) stdenv;
inherit (buildPackages.buildPackages) rsync;
};
include = self.callPackage ./pkgs/include.nix { sys-headers = self.callPackage ./pkgs/sys/headers.nix {
inherit (buildPackages.netbsd) inherit (buildPackages.netbsd)
makeMinimal install nbperf rpcgen; makeMinimal
inherit (buildPackages) stdenv; install
inherit (buildPackages.buildPackages) rsync; tsort
}; lorder
statHook
uudecode
config
genassym
;
inherit (buildPackages.buildPackages) rsync;
};
sys-headers = self.callPackage ./pkgs/sys/headers.nix { libutil = self.callPackage ./pkgs/libutil.nix { inherit (self) libc sys; };
inherit (buildPackages.netbsd)
makeMinimal install tsort lorder statHook uudecode config genassym;
inherit (buildPackages.buildPackages) rsync;
};
libutil = self.callPackage ./pkgs/libutil.nix { libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { };
inherit (self) libc sys;
};
libpthread-headers = self.callPackage ./pkgs/libpthread/headers.nix { }; csu = self.callPackage ./pkgs/csu.nix {
inherit (self) headers sys ld_elf_so;
inherit (buildPackages.netbsd)
netbsdSetupHook
makeMinimal
install
genassym
gencat
lorder
tsort
statHook
;
inherit (buildPackages.buildPackages) rsync;
};
csu = self.callPackage ./pkgs/csu.nix { _mainLibcExtraPaths = with self; [
inherit (self) headers sys ld_elf_so; common
inherit (buildPackages.netbsd) i18n_module.src
netbsdSetupHook sys.src
makeMinimal ld_elf_so.src
install libpthread.src
genassym gencat lorder tsort statHook; libm.src
inherit (buildPackages.buildPackages) rsync; libresolv.src
}; librpcsvc.src
libutil.src
librt.src
libcrypt.src
];
_mainLibcExtraPaths = with self; [ libc = self.callPackage ./pkgs/libc.nix {
common i18n_module.src sys.src inherit (self) headers csu librt;
ld_elf_so.src libpthread.src libm.src libresolv.src inherit (buildPackages.netbsd)
librpcsvc.src libutil.src librt.src libcrypt.src netbsdSetupHook
]; makeMinimal
install
genassym
gencat
lorder
tsort
statHook
rpcgen
;
inherit (buildPackages.buildPackages) rsync;
};
libc = self.callPackage ./pkgs/libc.nix { mtree = self.callPackage ./pkgs/mtree.nix { inherit (self) mknod; };
inherit (self) headers csu librt; }
inherit (buildPackages.netbsd) );
netbsdSetupHook
makeMinimal
install
genassym gencat lorder tsort statHook rpcgen;
inherit (buildPackages.buildPackages) rsync;
};
mtree = self.callPackage ./pkgs/mtree.nix {
inherit (self) mknod;
};
}));
} }

View File

@ -1,21 +1,29 @@
{ lib, mkDerivation, stdenv {
, zlib lib,
, defaultMakeFlags mkDerivation,
, coreutils stdenv,
, cctools-port zlib,
, include, libc, libutil defaultMakeFlags,
, install coreutils,
, bsdSetupHook, netbsdSetupHook cctools-port,
, makeMinimal include,
, rsync libc,
, fetchNetBSD libutil,
, _mainLibcExtraPaths install,
bsdSetupHook,
netbsdSetupHook,
makeMinimal,
rsync,
fetchNetBSD,
_mainLibcExtraPaths,
}: }:
mkDerivation (let mkDerivation (
let
version = "9.2"; version = "9.2";
commonDeps = [ zlib ]; commonDeps = [ zlib ];
in { in
{
path = "tools/compat"; path = "tools/compat";
sha256 = "1vsxg7136nlhc72vpa664vs22874xh7ila95nkmsd8crn3z3cyn0"; sha256 = "1vsxg7136nlhc72vpa664vs22874xh7ila95nkmsd8crn3z3cyn0";
inherit version; inherit version;
@ -29,19 +37,23 @@ mkDerivation (let
make include/.stamp configure nbtool_config.h.in defs.mk.in make include/.stamp configure nbtool_config.h.in defs.mk.in
''; '';
configurePlatforms = [ "build" "host" ]; configurePlatforms = [
configureFlags = [ "build"
"--cache-file=config.cache" "host"
] ++ lib.optionals stdenv.hostPlatform.isMusl [
# We include this header in our musl package only for legacy
# compatibility, and compat works fine without it (and having it
# know about sys/cdefs.h breaks packages like glib when built
# statically).
"ac_cv_header_sys_cdefs_h=no"
]; ];
configureFlags =
[ "--cache-file=config.cache" ]
++ lib.optionals stdenv.hostPlatform.isMusl [
# We include this header in our musl package only for legacy
# compatibility, and compat works fine without it (and having it
# know about sys/cdefs.h breaks packages like glib when built
# statically).
"ac_cv_header_sys_cdefs_h=no"
];
nativeBuildInputs = commonDeps ++ [ nativeBuildInputs = commonDeps ++ [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
rsync rsync
]; ];
@ -50,22 +62,27 @@ mkDerivation (let
# temporarily use gnuinstall for bootstrapping # temporarily use gnuinstall for bootstrapping
# bsdinstall will be built later # bsdinstall will be built later
makeFlags = defaultMakeFlags ++ [ makeFlags =
"INSTALL=${coreutils}/bin/install" defaultMakeFlags
"DATADIR=$(out)/share" ++ [
# Can't sort object files yet "INSTALL=${coreutils}/bin/install"
"LORDER=echo" "DATADIR=$(out)/share"
"TSORT=cat" # Can't sort object files yet
# Can't process man pages yet "LORDER=echo"
"MKSHARE=no" "TSORT=cat"
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Can't process man pages yet
# GNU objcopy produces broken .a libs which won't link into dependers. "MKSHARE=no"
# Makefiles only invoke `$OBJCOPY -x/-X`, so cctools strip works here. ]
"OBJCOPY=${cctools-port}/bin/strip" ++ lib.optionals stdenv.hostPlatform.isDarwin [
]; # GNU objcopy produces broken .a libs which won't link into dependers.
# Makefiles only invoke `$OBJCOPY -x/-X`, so cctools strip works here.
"OBJCOPY=${cctools-port}/bin/strip"
];
RENAME = "-D"; RENAME = "-D";
passthru.tests = { netbsd-install = install; }; passthru.tests = {
netbsd-install = install;
};
patches = [ patches = [
./compat-cxx-safe-header.patch ./compat-cxx-safe-header.patch
@ -79,42 +96,51 @@ mkDerivation (let
makeFlagsArray+=('INSTALL_SYMLINK=''${INSTALL} ''${SYMLINK} ''${RENAME}') makeFlagsArray+=('INSTALL_SYMLINK=''${INSTALL} ''${SYMLINK} ''${RENAME}')
''; '';
postInstall = '' postInstall =
# why aren't these installed by netbsd? ''
install -D compat_defs.h $out/include/compat_defs.h # why aren't these installed by netbsd?
install -D $BSDSRCDIR/include/cdbw.h $out/include/cdbw.h install -D compat_defs.h $out/include/compat_defs.h
install -D $BSDSRCDIR/sys/sys/cdbr.h $out/include/cdbr.h install -D $BSDSRCDIR/include/cdbw.h $out/include/cdbw.h
install -D $BSDSRCDIR/sys/sys/featuretest.h \ install -D $BSDSRCDIR/sys/sys/cdbr.h $out/include/cdbr.h
$out/include/sys/featuretest.h install -D $BSDSRCDIR/sys/sys/featuretest.h \
install -D $BSDSRCDIR/sys/sys/md5.h $out/include/md5.h $out/include/sys/featuretest.h
install -D $BSDSRCDIR/sys/sys/rmd160.h $out/include/rmd160.h install -D $BSDSRCDIR/sys/sys/md5.h $out/include/md5.h
install -D $BSDSRCDIR/sys/sys/sha1.h $out/include/sha1.h install -D $BSDSRCDIR/sys/sys/rmd160.h $out/include/rmd160.h
install -D $BSDSRCDIR/sys/sys/sha2.h $out/include/sha2.h install -D $BSDSRCDIR/sys/sys/sha1.h $out/include/sha1.h
install -D $BSDSRCDIR/sys/sys/queue.h $out/include/sys/queue.h install -D $BSDSRCDIR/sys/sys/sha2.h $out/include/sha2.h
install -D $BSDSRCDIR/include/vis.h $out/include/vis.h install -D $BSDSRCDIR/sys/sys/queue.h $out/include/sys/queue.h
install -D $BSDSRCDIR/include/db.h $out/include/db.h install -D $BSDSRCDIR/include/vis.h $out/include/vis.h
install -D $BSDSRCDIR/include/netconfig.h $out/include/netconfig.h install -D $BSDSRCDIR/include/db.h $out/include/db.h
install -D $BSDSRCDIR/include/utmpx.h $out/include/utmpx.h install -D $BSDSRCDIR/include/netconfig.h $out/include/netconfig.h
install -D $BSDSRCDIR/include/tzfile.h $out/include/tzfile.h install -D $BSDSRCDIR/include/utmpx.h $out/include/utmpx.h
install -D $BSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h install -D $BSDSRCDIR/include/tzfile.h $out/include/tzfile.h
install -D $BSDSRCDIR/include/nl_types.h $out/include/nl_types.h install -D $BSDSRCDIR/sys/sys/tree.h $out/include/sys/tree.h
install -D $BSDSRCDIR/include/stringlist.h $out/include/stringlist.h install -D $BSDSRCDIR/include/nl_types.h $out/include/nl_types.h
install -D $BSDSRCDIR/include/stringlist.h $out/include/stringlist.h
# Collapse includes slightly to fix dangling reference # Collapse includes slightly to fix dangling reference
install -D $BSDSRCDIR/common/include/rpc/types.h $out/include/rpc/types.h install -D $BSDSRCDIR/common/include/rpc/types.h $out/include/rpc/types.h
sed -i '1s;^;#include "nbtool_config.h"\n;' $out/include/rpc/types.h sed -i '1s;^;#include "nbtool_config.h"\n;' $out/include/rpc/types.h
'' + lib.optionalString stdenv.isDarwin '' ''
mkdir -p $out/include/ssp + lib.optionalString stdenv.isDarwin ''
touch $out/include/ssp/ssp.h mkdir -p $out/include/ssp
'' + '' touch $out/include/ssp/ssp.h
mkdir -p $out/lib/pkgconfig ''
substitute ${./libbsd-overlay.pc} $out/lib/pkgconfig/libbsd-overlay.pc \ + ''
--subst-var-by out $out \ mkdir -p $out/lib/pkgconfig
--subst-var-by version ${version} substitute ${./libbsd-overlay.pc} $out/lib/pkgconfig/libbsd-overlay.pc \
''; --subst-var-by out $out \
extraPaths = [ include.src libc.src libutil.src --subst-var-by version ${version}
'';
extraPaths = [
include.src
libc.src
libutil.src
(fetchNetBSD "external/bsd/flex" "9.2" "0h98jpfj7vx5zh7vd7bk6b1hmzgkcb757a8j6d9zgygxxv13v43m") (fetchNetBSD "external/bsd/flex" "9.2" "0h98jpfj7vx5zh7vd7bk6b1hmzgkcb757a8j6d9zgygxxv13v43m")
(fetchNetBSD "sys/sys" "9.2" "0zawhw51klaigqqwkx0lzrx3mim2jywrc24cm7c66qsf1im9awgd") (fetchNetBSD "sys/sys" "9.2" "0zawhw51klaigqqwkx0lzrx3mim2jywrc24cm7c66qsf1im9awgd")
(fetchNetBSD "common/include/rpc/types.h" "9.2" "0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a") (fetchNetBSD "common/include/rpc/types.h" "9.2"
"0n2df12mlc3cbc48jxq35yzl1y7ghgpykvy7jnfh898rdhac7m9a"
)
] ++ libutil.extraPaths ++ _mainLibcExtraPaths; ] ++ libutil.extraPaths ++ _mainLibcExtraPaths;
}) }
)

View File

@ -1,8 +1,15 @@
{ mkDerivation {
, bsdSetupHook, netbsdSetupHook mkDerivation,
, makeMinimal, install, mandoc, byacc, flex, rsync bsdSetupHook,
, compatIfNeeded netbsdSetupHook,
, cksum makeMinimal,
install,
mandoc,
byacc,
flex,
rsync,
compatIfNeeded,
cksum,
}: }:
mkDerivation { mkDerivation {
path = "usr.bin/config"; path = "usr.bin/config";
@ -10,8 +17,14 @@ mkDerivation {
sha256 = "1yz3n4hncdkk6kp595fh2q5lg150vpqg8iw2dccydkyw4y3hgsjj"; sha256 = "1yz3n4hncdkk6kp595fh2q5lg150vpqg8iw2dccydkyw4y3hgsjj";
env.NIX_CFLAGS_COMPILE = toString [ "-DMAKE_BOOTSTRAP" ]; env.NIX_CFLAGS_COMPILE = toString [ "-DMAKE_BOOTSTRAP" ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
makeMinimal install mandoc byacc flex rsync netbsdSetupHook
makeMinimal
install
mandoc
byacc
flex
rsync
]; ];
buildInputs = compatIfNeeded; buildInputs = compatIfNeeded;
extraPaths = [ cksum.src ]; extraPaths = [ cksum.src ];

View File

@ -1,11 +1,23 @@
{ lib, mkDerivation {
, bsdSetupHook, netbsdSetupHook lib,
, makeMinimal mkDerivation,
, install, mandoc, groff, flex bsdSetupHook,
, byacc, genassym, gencat, lorder, tsort, statHook, rsync netbsdSetupHook,
, headers makeMinimal,
, sys install,
, ld_elf_so mandoc,
groff,
flex,
byacc,
genassym,
gencat,
lorder,
tsort,
statHook,
rsync,
headers,
sys,
ld_elf_so,
}: }:
mkDerivation { mkDerivation {
@ -14,11 +26,24 @@ mkDerivation {
sha256 = "0al5jfazvhlzn9hvmnrbchx4d0gm282hq5gp4xs2zmj9ycmf6d03"; sha256 = "0al5jfazvhlzn9hvmnrbchx4d0gm282hq5gp4xs2zmj9ycmf6d03";
meta.platforms = lib.platforms.netbsd; meta.platforms = lib.platforms.netbsd;
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
install mandoc groff flex install
byacc genassym gencat lorder tsort statHook rsync mandoc
groff
flex
byacc
genassym
gencat
lorder
tsort
statHook
rsync
]; ];
buildInputs = [ headers ]; buildInputs = [ headers ];
extraPaths = [ sys.src ld_elf_so.src ]; extraPaths = [
sys.src
ld_elf_so.src
];
} }

View File

@ -1,7 +1,10 @@
{ mkDerivation {
, bsdSetupHook, netbsdSetupHook, rsync mkDerivation,
, compatIfNeeded bsdSetupHook,
, fetchNetBSD netbsdSetupHook,
rsync,
compatIfNeeded,
fetchNetBSD,
}: }:
mkDerivation { mkDerivation {
@ -10,12 +13,16 @@ mkDerivation {
sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77"; sha256 = "01d4fpxvz1pgzfk5xznz5dcm0x0gdzwcsfm1h3d0xc9kc6hj2q77";
version = "9.2"; version = "9.2";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook rsync bsdSetupHook
netbsdSetupHook
rsync
]; ];
propagatedBuildInputs = compatIfNeeded; propagatedBuildInputs = compatIfNeeded;
extraPaths = [ extraPaths = [
(fetchNetBSD "lib/libc/gen/fts.c" "9.2" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7") (fetchNetBSD "lib/libc/gen/fts.c" "9.2" "1a8hmf26242nmv05ipn3ircxb0jqmmi66rh78kkyi9vjwkfl3qn7")
(fetchNetBSD "lib/libc/include/namespace.h" "9.2" "0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc") (fetchNetBSD "lib/libc/include/namespace.h" "9.2"
"0kksr3pdwdc1cplqf5z12ih4cml6l11lqrz91f7hjjm64y7785kc"
)
(fetchNetBSD "lib/libc/gen/fts.3" "9.2" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1") (fetchNetBSD "lib/libc/gen/fts.3" "9.2" "1asxw0n3fhjdadwkkq3xplfgqgl3q32w1lyrvbakfa3gs0wz5zc1")
]; ];
skipIncludesPhase = true; skipIncludesPhase = true;

View File

@ -1,4 +1,10 @@
{ lib, symlinkJoin, include, sys-headers, libpthread-headers }: {
lib,
symlinkJoin,
include,
sys-headers,
libpthread-headers,
}:
symlinkJoin { symlinkJoin {
name = "netbsd-headers-9.2"; name = "netbsd-headers-9.2";

View File

@ -1,4 +1,8 @@
{ lib, mkDerivation, libc }: {
lib,
mkDerivation,
libc,
}:
mkDerivation { mkDerivation {
path = "lib/i18n_module"; path = "lib/i18n_module";

View File

@ -1,10 +1,18 @@
{ lib, mkDerivation {
, bsdSetupHook, netbsdSetupHook lib,
, makeMinimal mkDerivation,
, install, mandoc, groff, rsync, nbperf, rpcgen bsdSetupHook,
, common netbsdSetupHook,
, defaultMakeFlags makeMinimal,
, stdenv install,
mandoc,
groff,
rsync,
nbperf,
rpcgen,
common,
defaultMakeFlags,
stdenv,
}: }:
mkDerivation { mkDerivation {
@ -12,9 +20,15 @@ mkDerivation {
version = "9.2"; version = "9.2";
sha256 = "0nxnmj4c8s3hb9n3fpcmd0zl3l1nmhivqgi9a35sis943qvpgl9h"; sha256 = "0nxnmj4c8s3hb9n3fpcmd0zl3l1nmhivqgi9a35sis943qvpgl9h";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
install mandoc groff rsync nbperf rpcgen install
mandoc
groff
rsync
nbperf
rpcgen
]; ];
# The makefiles define INCSDIR per subdirectory, so we have to set # The makefiles define INCSDIR per subdirectory, so we have to set

View File

@ -1,10 +1,16 @@
{ mkDerivation {
, writeShellScript mkDerivation,
, mtree, make writeShellScript,
, bsdSetupHook, netbsdSetupHook mtree,
, makeMinimal make,
, mandoc, groff, rsync bsdSetupHook,
, compatIfNeeded, fts netbsdSetupHook,
makeMinimal,
mandoc,
groff,
rsync,
compatIfNeeded,
fts,
}: }:
@ -18,32 +24,39 @@ let
@out@/bin/xinstall "$@" @out@/bin/xinstall "$@"
''; '';
in in
mkDerivation { mkDerivation {
path = "usr.bin/xinstall"; path = "usr.bin/xinstall";
version = "9.2"; version = "9.2";
sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj"; sha256 = "1f6pbz3qv1qcrchdxif8p5lbmnwl8b9nq615hsd3cyl4avd5bfqj";
extraPaths = [ mtree.src make.src ]; extraPaths = [
nativeBuildInputs = [ mtree.src
bsdSetupHook netbsdSetupHook make.src
makeMinimal ];
mandoc groff rsync nativeBuildInputs = [
]; bsdSetupHook
skipIncludesPhase = true; netbsdSetupHook
buildInputs = compatIfNeeded makeMinimal
# fts header is needed. glibc already has this header, but musl doesn't, mandoc
# so make sure pkgsMusl.netbsd.install still builds in case you want to groff
# remove it! rsync
++ [ fts ]; ];
installPhase = '' skipIncludesPhase = true;
runHook preInstall buildInputs =
compatIfNeeded
# fts header is needed. glibc already has this header, but musl doesn't,
# so make sure pkgsMusl.netbsd.install still builds in case you want to
# remove it!
++ [ fts ];
installPhase = ''
runHook preInstall
install -D install.1 $out/share/man/man1/install.1 install -D install.1 $out/share/man/man1/install.1
install -D xinstall $out/bin/xinstall install -D xinstall $out/bin/xinstall
install -D -m 0550 ${binstall} $out/bin/binstall install -D -m 0550 ${binstall} $out/bin/binstall
substituteInPlace $out/bin/binstall --subst-var out substituteInPlace $out/bin/binstall --subst-var out
ln -s $out/bin/binstall $out/bin/install ln -s $out/bin/binstall $out/bin/install
runHook postInstall runHook postInstall
''; '';
setupHook = ./install-setup-hook.sh; setupHook = ./install-setup-hook.sh;
} }

View File

@ -1,11 +1,12 @@
{ lib {
, mkDerivation lib,
, libc mkDerivation,
, defaultMakeFlags libc,
defaultMakeFlags,
}: }:
mkDerivation { mkDerivation {
path = "libexec/ld.elf_so"; path = "libexec/ld.elf_so";
version = "9.2"; version = "9.2";
sha256 = "0ia9mqzdljly0vqfwflm5mzz55k7qsr4rw2bzhivky6k30vgirqa"; sha256 = "0ia9mqzdljly0vqfwflm5mzz55k7qsr4rw2bzhivky6k30vgirqa";
meta.platforms = lib.platforms.netbsd; meta.platforms = lib.platforms.netbsd;
@ -13,6 +14,9 @@ mkDerivation {
# Hack to prevent a symlink being installed here for compatibility. # Hack to prevent a symlink being installed here for compatibility.
SHLINKINSTALLDIR = "/usr/libexec"; SHLINKINSTALLDIR = "/usr/libexec";
USE_FORT = "yes"; USE_FORT = "yes";
makeFlags = defaultMakeFlags ++ [ "BINDIR=$(out)/libexec" "CLIBOBJ=${libc}/lib" ]; makeFlags = defaultMakeFlags ++ [
"BINDIR=$(out)/libexec"
"CLIBOBJ=${libc}/lib"
];
extraPaths = [ libc.src ] ++ libc.extraPaths; extraPaths = [ libc.src ] ++ libc.extraPaths;
} }

View File

@ -1,14 +1,27 @@
{ lib {
, mkDerivation lib,
, defaultMakeFlags mkDerivation,
, _mainLibcExtraPaths defaultMakeFlags,
, fetchNetBSD _mainLibcExtraPaths,
, bsdSetupHook, netbsdSetupHook fetchNetBSD,
, makeMinimal bsdSetupHook,
, install, mandoc, groff, flex netbsdSetupHook,
, byacc, genassym, gencat, lorder, tsort, statHook, rsync, rpcgen makeMinimal,
, csu, headers install,
, librt mandoc,
groff,
flex,
byacc,
genassym,
gencat,
lorder,
tsort,
statHook,
rsync,
rpcgen,
csu,
headers,
librt,
}: }:
mkDerivation { mkDerivation {
@ -21,18 +34,32 @@ mkDerivation {
(fetchNetBSD "external/bsd/jemalloc" "9.2" "0cq704swa0h2yxv4gc79z2lwxibk9k7pxh3q5qfs7axx3jx3n8kb") (fetchNetBSD "external/bsd/jemalloc" "9.2" "0cq704swa0h2yxv4gc79z2lwxibk9k7pxh3q5qfs7axx3jx3n8kb")
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
install mandoc groff flex install
byacc genassym gencat lorder tsort statHook rsync rpcgen mandoc
groff
flex
byacc
genassym
gencat
lorder
tsort
statHook
rsync
rpcgen
];
buildInputs = [
headers
csu
]; ];
buildInputs = [ headers csu ];
env.NIX_CFLAGS_COMPILE = "-B${csu}/lib -fcommon"; env.NIX_CFLAGS_COMPILE = "-B${csu}/lib -fcommon";
meta.platforms = lib.platforms.netbsd; meta.platforms = lib.platforms.netbsd;
SHLIBINSTALLDIR = "$(out)/lib"; SHLIBINSTALLDIR = "$(out)/lib";
MKPICINSTALL = "yes"; MKPICINSTALL = "yes";
NLSDIR = "$(out)/share/nls"; NLSDIR = "$(out)/share/nls";
makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/var/db"]; makeFlags = defaultMakeFlags ++ [ "FILESDIR=$(out)/var/db" ];
postInstall = '' postInstall = ''
pushd ${headers} pushd ${headers}
find . -type d -exec mkdir -p $out/\{} \; find . -type d -exec mkdir -p $out/\{} \;

View File

@ -1,7 +1,10 @@
{ lib, mkDerivation, stdenv {
, libterminfo lib,
, compatIfNeeded mkDerivation,
, defaultMakeFlags stdenv,
libterminfo,
compatIfNeeded,
defaultMakeFlags,
}: }:
mkDerivation { mkDerivation {
@ -9,11 +12,14 @@ mkDerivation {
version = "9.2"; version = "9.2";
sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal"; sha256 = "0pd0dggl3w4bv5i5h0s1wrc8hr66n4hkv3zlklarwfdhc692fqal";
buildInputs = [ libterminfo ]; buildInputs = [ libterminfo ];
env.NIX_CFLAGS_COMPILE = toString ([ env.NIX_CFLAGS_COMPILE = toString (
"-D__scanflike(a,b)=" [
"-D__va_list=va_list" "-D__scanflike(a,b)="
"-D__warn_references(a,b)=" "-D__va_list=va_list"
] ++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="); "-D__warn_references(a,b)="
]
++ lib.optional stdenv.isDarwin "-D__strong_alias(a,b)="
);
propagatedBuildInputs = compatIfNeeded; propagatedBuildInputs = compatIfNeeded;
MKDOC = "no"; # missing vfontedpr MKDOC = "no"; # missing vfontedpr
makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ];

View File

@ -1,26 +1,32 @@
{ lib, mkDerivation {
, libterminfo, libcurses lib,
, compatIfNeeded mkDerivation,
, defaultMakeFlags libterminfo,
libcurses,
compatIfNeeded,
defaultMakeFlags,
}: }:
mkDerivation { mkDerivation {
path = "lib/libedit"; path = "lib/libedit";
version = "9.2"; version = "9.2";
sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj"; sha256 = "1wqhngraxwqk4jgrf5f18jy195yrp7c06n1gf31pbplq79mg1bcj";
buildInputs = [ libterminfo libcurses ]; buildInputs = [
propagatedBuildInputs = compatIfNeeded; libterminfo
SHLIBINSTALLDIR = "$(out)/lib"; libcurses
makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ]; ];
postPatch = '' propagatedBuildInputs = compatIfNeeded;
sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h SHLIBINSTALLDIR = "$(out)/lib";
substituteInPlace $COMPONENT_PATH/config.h \ makeFlags = defaultMakeFlags ++ [ "LIBDO.terminfo=${libterminfo}/lib" ];
--replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" "" postPatch = ''
substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include" sed -i '1i #undef bool_t' $COMPONENT_PATH/el.h
''; substituteInPlace $COMPONENT_PATH/config.h \
env.NIX_CFLAGS_COMPILE = toString [ --replace "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" ""
"-D__noinline=" substituteInPlace $COMPONENT_PATH/readline/Makefile --replace /usr/include "$out/include"
"-D__scanflike(a,b)=" '';
"-D__va_list=va_list" env.NIX_CFLAGS_COMPILE = toString [
]; "-D__noinline="
} "-D__scanflike(a,b)="
"-D__va_list=va_list"
];
}

View File

@ -1,4 +1,8 @@
{ lib, mkDerivation, sys }: {
lib,
mkDerivation,
sys,
}:
mkDerivation { mkDerivation {
path = "lib/libm"; path = "lib/libm";

View File

@ -1,4 +1,8 @@
{ lib, mkDerivation, sys }: {
lib,
mkDerivation,
sys,
}:
mkDerivation { mkDerivation {
pname = "libpci"; pname = "libpci";

View File

@ -3,4 +3,3 @@
version = "9.2"; version = "9.2";
sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h"; sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h";
} }

View File

@ -1,9 +1,12 @@
{ lib, mkDerivation }: { lib, mkDerivation }:
mkDerivation (import ./base.nix // { mkDerivation (
pname = "libpthread-headers"; import ./base.nix
installPhase = "includesPhase"; // {
dontBuild = true; pname = "libpthread-headers";
noCC = true; installPhase = "includesPhase";
meta.platforms = lib.platforms.netbsd; dontBuild = true;
}) noCC = true;
meta.platforms = lib.platforms.netbsd;
}
)

View File

@ -1,15 +1,28 @@
{ lib, mkDerivation {
, headers lib,
, common, libc, librt, sys mkDerivation,
headers,
common,
libc,
librt,
sys,
}: }:
mkDerivation (import ./base.nix // { mkDerivation (
pname = "libpthread"; import ./base.nix
installPhase = null; // {
noCC = false; pname = "libpthread";
dontBuild = false; installPhase = null;
buildInputs = [ headers ]; noCC = false;
SHLIBINSTALLDIR = "$(out)/lib"; dontBuild = false;
extraPaths = [ common libc.src librt.src sys.src ]; buildInputs = [ headers ];
meta.platforms = lib.platforms.netbsd; SHLIBINSTALLDIR = "$(out)/lib";
}) extraPaths = [
common
libc.src
librt.src
sys.src
];
meta.platforms = lib.platforms.netbsd;
}
)

View File

@ -1,4 +1,8 @@
{ lib, mkDerivation, libc }: {
lib,
mkDerivation,
libc,
}:
mkDerivation { mkDerivation {
path = "lib/libresolv"; path = "lib/libresolv";

View File

@ -1,9 +1,15 @@
{ lib {
, mkDerivation lib,
, defaultMakeFlags mkDerivation,
, bsdSetupHook, netbsdSetupHook defaultMakeFlags,
, makeMinimal bsdSetupHook,
, install, tsort, lorder, rpcgen, statHook netbsdSetupHook,
makeMinimal,
install,
tsort,
lorder,
rpcgen,
statHook,
}: }:
mkDerivation { mkDerivation {
@ -13,9 +19,13 @@ mkDerivation {
makeFlags = defaultMakeFlags ++ [ "INCSDIR=$(out)/include/rpcsvc" ]; makeFlags = defaultMakeFlags ++ [ "INCSDIR=$(out)/include/rpcsvc" ];
meta.platforms = lib.platforms.netbsd; meta.platforms = lib.platforms.netbsd;
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
install tsort lorder rpcgen statHook install
tsort
lorder
rpcgen
statHook
]; ];
} }

View File

@ -1,4 +1,9 @@
{ lib, mkDerivation, libc, headers }: {
lib,
mkDerivation,
libc,
headers,
}:
mkDerivation { mkDerivation {
path = "lib/librt"; path = "lib/librt";

View File

@ -1,8 +1,18 @@
{ mkDerivation {
, bsdSetupHook, netbsdSetupHook mkDerivation,
, makeMinimal, install, tsort, lorder, mandoc, statHook, nbperf, tic, rsync bsdSetupHook,
, compatIfNeeded netbsdSetupHook,
, fetchNetBSD makeMinimal,
install,
tsort,
lorder,
mandoc,
statHook,
nbperf,
tic,
rsync,
compatIfNeeded,
fetchNetBSD,
}: }:
mkDerivation { mkDerivation {
@ -10,8 +20,17 @@ mkDerivation {
version = "9.2"; version = "9.2";
sha256 = "0pq05k3dj0dfsczv07frnnji92mazmy2qqngqbx2zgqc1x251414"; sha256 = "0pq05k3dj0dfsczv07frnnji92mazmy2qqngqbx2zgqc1x251414";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
makeMinimal install tsort lorder mandoc statHook nbperf tic rsync netbsdSetupHook
makeMinimal
install
tsort
lorder
mandoc
statHook
nbperf
tic
rsync
]; ];
buildInputs = compatIfNeeded; buildInputs = compatIfNeeded;
SHLIBINSTALLDIR = "$(out)/lib"; SHLIBINSTALLDIR = "$(out)/lib";

View File

@ -1,20 +1,41 @@
{ mkDerivation {
, common, libc, sys mkDerivation,
, bsdSetupHook, netbsdSetupHook common,
, makeMinimal libc,
, byacc, install, tsort, lorder, mandoc, statHook, rsync sys,
, headers bsdSetupHook,
netbsdSetupHook,
makeMinimal,
byacc,
install,
tsort,
lorder,
mandoc,
statHook,
rsync,
headers,
}: }:
mkDerivation { mkDerivation {
path = "lib/libutil"; path = "lib/libutil";
version = "9.2"; version = "9.2";
sha256 = "02gm5a5zhh8qp5r5q5r7x8x6x50ir1i0ncgsnfwh1vnrz6mxbq7z"; sha256 = "02gm5a5zhh8qp5r5q5r7x8x6x50ir1i0ncgsnfwh1vnrz6mxbq7z";
extraPaths = [ common libc.src sys.src ]; extraPaths = [
common
libc.src
sys.src
];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
byacc install tsort lorder mandoc statHook rsync byacc
install
tsort
lorder
mandoc
statHook
rsync
]; ];
buildInputs = [ headers ]; buildInputs = [ headers ];
SHLIBINSTALLDIR = "$(out)/lib"; SHLIBINSTALLDIR = "$(out)/lib";

View File

@ -1,7 +1,12 @@
{ mkDerivation {
, bsdSetupHook, netbsdSetupHook mkDerivation,
, makeMinimal bsdSetupHook,
, install, mandoc, groff, rsync netbsdSetupHook,
makeMinimal,
install,
mandoc,
groff,
rsync,
}: }:
mkDerivation { mkDerivation {
@ -9,8 +14,12 @@ mkDerivation {
version = "9.2"; version = "9.2";
sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2"; sha256 = "0rjf9blihhm0n699vr2bg88m4yjhkbxh6fxliaay3wxkgnydjwn2";
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook bsdSetupHook
netbsdSetupHook
makeMinimal makeMinimal
install mandoc groff rsync install
mandoc
groff
rsync
]; ];
} }

View File

@ -1,56 +1,63 @@
{ lib, mkDerivation, fetchNetBSD, stdenv }: {
lib,
mkDerivation,
fetchNetBSD,
stdenv,
}:
mkDerivation { mkDerivation {
path = "usr.bin/make"; path = "usr.bin/make";
sha256 = "0vi73yicbmbp522qzqvd979cx6zm5jakhy77xh73c1kygf8klccs"; sha256 = "0vi73yicbmbp522qzqvd979cx6zm5jakhy77xh73c1kygf8klccs";
version = "9.2"; version = "9.2";
postPatch = '' postPatch =
substituteInPlace $BSDSRCDIR/share/mk/bsd.doc.mk \ ''
--replace '-o ''${DOCOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.doc.mk \
--replace '-g ''${DOCGRP}' "" --replace '-o ''${DOCOWN}' "" \
for mk in $BSDSRCDIR/share/mk/bsd.inc.mk $BSDSRCDIR/share/mk/bsd.kinc.mk; do --replace '-g ''${DOCGRP}' ""
substituteInPlace $mk \ for mk in $BSDSRCDIR/share/mk/bsd.inc.mk $BSDSRCDIR/share/mk/bsd.kinc.mk; do
--replace '-o ''${BINOWN}' "" \ substituteInPlace $mk \
--replace '-g ''${BINGRP}' "" --replace '-o ''${BINOWN}' "" \
done --replace '-g ''${BINGRP}' ""
substituteInPlace $BSDSRCDIR/share/mk/bsd.kmodule.mk \ done
--replace '-o ''${KMODULEOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.kmodule.mk \
--replace '-g ''${KMODULEGRP}' "" --replace '-o ''${KMODULEOWN}' "" \
substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ --replace '-g ''${KMODULEGRP}' ""
--replace '-o ''${LIBOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \
--replace '-g ''${LIBGRP}' "" \ --replace '-o ''${LIBOWN}' "" \
--replace '-o ''${DEBUGOWN}' "" \ --replace '-g ''${LIBGRP}' "" \
--replace '-g ''${DEBUGGRP}' "" --replace '-o ''${DEBUGOWN}' "" \
substituteInPlace $BSDSRCDIR/share/mk/bsd.lua.mk \ --replace '-g ''${DEBUGGRP}' ""
--replace '-o ''${LIBOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.lua.mk \
--replace '-g ''${LIBGRP}' "" --replace '-o ''${LIBOWN}' "" \
substituteInPlace $BSDSRCDIR/share/mk/bsd.man.mk \ --replace '-g ''${LIBGRP}' ""
--replace '-o ''${MANOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.man.mk \
--replace '-g ''${MANGRP}' "" --replace '-o ''${MANOWN}' "" \
substituteInPlace $BSDSRCDIR/share/mk/bsd.nls.mk \ --replace '-g ''${MANGRP}' ""
--replace '-o ''${NLSOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.nls.mk \
--replace '-g ''${NLSGRP}' "" --replace '-o ''${NLSOWN}' "" \
substituteInPlace $BSDSRCDIR/share/mk/bsd.prog.mk \ --replace '-g ''${NLSGRP}' ""
--replace '-o ''${BINOWN}' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.prog.mk \
--replace '-g ''${BINGRP}' "" \ --replace '-o ''${BINOWN}' "" \
--replace '-o ''${RUMPBINOWN}' "" \ --replace '-g ''${BINGRP}' "" \
--replace '-g ''${RUMPBINGRP}' "" \ --replace '-o ''${RUMPBINOWN}' "" \
--replace '-o ''${DEBUGOWN}' "" \ --replace '-g ''${RUMPBINGRP}' "" \
--replace '-g ''${DEBUGGRP}' "" --replace '-o ''${DEBUGOWN}' "" \
--replace '-g ''${DEBUGGRP}' ""
# make needs this to pick up our sys make files # make needs this to pick up our sys make files
export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\"" export NIX_CFLAGS_COMPILE+=" -D_PATH_DEFSYSPATH=\"$out/share/mk\""
substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \ substituteInPlace $BSDSRCDIR/share/mk/bsd.lib.mk \
--replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB=' --replace '_INSTRANLIB=''${empty(PRESERVE):?-a "''${RANLIB} -t":}' '_INSTRANLIB='
substituteInPlace $BSDSRCDIR/share/mk/bsd.kinc.mk \ substituteInPlace $BSDSRCDIR/share/mk/bsd.kinc.mk \
--replace /bin/rm rm --replace /bin/rm rm
'' + lib.optionalString stdenv.isDarwin '' ''
substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \ + lib.optionalString stdenv.isDarwin ''
--replace '-Wl,--fatal-warnings' "" \ substituteInPlace $BSDSRCDIR/share/mk/bsd.sys.mk \
--replace '-Wl,--warn-shared-textrel' "" --replace '-Wl,--fatal-warnings' "" \
''; --replace '-Wl,--warn-shared-textrel' ""
'';
postInstall = '' postInstall = ''
make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install make -C $BSDSRCDIR/share/mk FILESDIR=$out/share/mk install
''; '';

View File

@ -1,6 +1,9 @@
{ mkDerivation {
, bsdSetupHook, netbsdSetupHook, rsync mkDerivation,
, make bsdSetupHook,
netbsdSetupHook,
rsync,
make,
}: }:
mkDerivation { mkDerivation {
@ -8,9 +11,11 @@ mkDerivation {
sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n"; sha256 = "0fh0nrnk18m613m5blrliq2aydciv51qhc0ihsj4k63incwbk90n";
version = "9.2"; version = "9.2";
buildInputs = []; buildInputs = [ ];
nativeBuildInputs = [ nativeBuildInputs = [
bsdSetupHook netbsdSetupHook rsync bsdSetupHook
netbsdSetupHook
rsync
]; ];
skipIncludesPhase = true; skipIncludesPhase = true;

Some files were not shown because too many files have changed in this diff Show More