Merge branch 'staging-next'

Status on Hydra for linuxes seems good enough:
https://hydra.nixos.org/eval/1585703?filter=linux&compare=1585482&full=#tabs-now-fail
This commit is contained in:
Vladimír Čunát
2020-05-06 08:20:05 +02:00
177 changed files with 652 additions and 531 deletions
-12
View File
@@ -191,18 +191,6 @@ deis = buildGoPackage rec {
To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/kamilchm/go2nix">go2nix</link>. It can produce complete derivation and <varname>goDeps</varname> file for Go programs.
</para>
<para>
<varname>buildGoPackage</varname> produces <xref linkend='chap-multiple-output' xrefstyle="select: title" /> where <varname>bin</varname> includes program binaries. You can test build a Go binary as follows:
<screen>
<prompt>$ </prompt>nix-build -A deis.bin
</screen>
or build all outputs with:
<screen>
<prompt>$ </prompt>nix-build -A deis.all
</screen>
<varname>bin</varname> output will be installed by default with <varname>nix-env -i</varname> or <varname>systemPackages</varname>.
</para>
<para>
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
<screen>
@@ -344,6 +344,11 @@ php.override {
the <literal>notmuch.emacs</literal> output.
</para>
</listitem>
<listitem>
<para>
The default output of <literal>buildGoPackage</literal> is now <literal>$out</literal> instead of <literal>$bin</literal>.
</para>
</listitem>
</itemizedlist>
</section>
</section>
+1
View File
@@ -51,6 +51,7 @@ in {
rtlwifi_new-firmware
zd1211fw
alsa-firmware
sof-firmware
openelec-dvb-firmware
] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware
++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [
+2 -2
View File
@@ -5,8 +5,8 @@ let
cfg = config.programs.singularity;
singularity = pkgs.singularity.overrideAttrs (attrs : {
installPhase = attrs.installPhase + ''
mv $bin/libexec/singularity/bin/starter-suid $bin/libexec/singularity/bin/starter-suid.orig
ln -s /run/wrappers/bin/singularity-suid $bin/libexec/singularity/bin/starter-suid
mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig
ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid
'';
});
in {
@@ -461,7 +461,7 @@ in
moreutils
remarshal
utillinux
cfg.package.bin
cfg.package
] ++ cfg.extraPackages;
reloadIfChanged = true;
serviceConfig = {
+1 -1
View File
@@ -75,7 +75,7 @@ in {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/confd";
ExecStart = "${cfg.package}/bin/confd";
};
};
+1 -1
View File
@@ -178,7 +178,7 @@ in {
serviceConfig = {
Type = "notify";
ExecStart = "${pkgs.etcd.bin}/bin/etcd";
ExecStart = "${pkgs.etcd}/bin/etcd";
User = "etcd";
LimitNOFILE = 40000;
};
+8 -8
View File
@@ -374,7 +374,7 @@ in
description = "gitea";
after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service";
wantedBy = [ "multi-user.target" ];
path = [ gitea.bin pkgs.gitAndTools.git ];
path = [ gitea pkgs.gitAndTools.git ];
preStart = let
runConfig = "${cfg.stateDir}/custom/conf/app.ini";
@@ -386,11 +386,11 @@ in
cp -f ${configFile} ${runConfig}
if [ ! -e ${secretKey} ]; then
${gitea.bin}/bin/gitea generate secret SECRET_KEY > ${secretKey}
${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey}
fi
if [ ! -e ${jwtSecret} ]; then
${gitea.bin}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret}
${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret}
fi
KEY="$(head -n1 ${secretKey})"
@@ -413,7 +413,7 @@ in
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*")
if [ "$HOOKS" ]
then
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
@@ -422,7 +422,7 @@ in
# update command option in authorized_keys
if [ -r ${cfg.stateDir}/.ssh/authorized_keys ]
then
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys
fi
'';
@@ -431,7 +431,7 @@ in
User = cfg.user;
Group = "gitea";
WorkingDirectory = cfg.stateDir;
ExecStart = "${gitea.bin}/bin/gitea web";
ExecStart = "${gitea}/bin/gitea web";
Restart = "always";
# Filesystem
@@ -492,7 +492,7 @@ in
description = "gitea dump";
after = [ "gitea.service" ];
wantedBy = [ "default.target" ];
path = [ gitea.bin ];
path = [ gitea ];
environment = {
USER = cfg.user;
@@ -503,7 +503,7 @@ in
serviceConfig = {
Type = "oneshot";
User = cfg.user;
ExecStart = "${gitea.bin}/bin/gitea dump";
ExecStart = "${gitea}/bin/gitea dump";
WorkingDirectory = cfg.stateDir;
};
};
+3 -3
View File
@@ -200,7 +200,7 @@ in
description = "Gogs (Go Git Service)";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.gogs.bin ];
path = [ pkgs.gogs ];
preStart = let
runConfig = "${cfg.stateDir}/custom/conf/app.ini";
@@ -230,7 +230,7 @@ in
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*")
if [ "$HOOKS" ]
then
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs.bin}/bin/gogs,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs}/bin/gogs,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
@@ -242,7 +242,7 @@ in
User = cfg.user;
Group = cfg.group;
WorkingDirectory = cfg.stateDir;
ExecStart = "${pkgs.gogs.bin}/bin/gogs web";
ExecStart = "${pkgs.gogs}/bin/gogs web";
Restart = "always";
};
+1 -1
View File
@@ -55,7 +55,7 @@ in
Restart = "on-failure";
WorkingDirectory = stateDir;
PrivateTmp = true;
ExecStart = "${pkgs.leaps.bin}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
ExecStart = "${pkgs.leaps}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
};
};
};
+1 -2
View File
@@ -35,7 +35,7 @@ in {
path = [ fake-lsb-release ];
serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/agent";
ExecStart = "${cfg.package}/bin/agent";
KillMode = "process";
Restart = "on-failure";
RestartSec = "15min";
@@ -43,4 +43,3 @@ in {
};
};
}
+1 -1
View File
@@ -148,7 +148,7 @@ in {
User = cfg.user;
Group = cfg.group;
ExecStart = ''
${cfg.package.bin}/bin/bosun -c ${configFile}
${cfg.package}/bin/bosun -c ${configFile}
'';
};
};
@@ -59,7 +59,7 @@ in {
"-templates ${cfg.templateDir}"
];
in {
ExecStart = "${pkgs.grafana_reporter.bin}/bin/grafana-reporter ${args}";
ExecStart = "${pkgs.grafana_reporter}/bin/grafana-reporter ${args}";
};
};
};
@@ -535,7 +535,7 @@ in {
${optionalString cfg.provision.enable ''
export GF_PATHS_PROVISIONING=${provisionConfDir};
''}
exec ${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir}
exec ${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir}
'';
serviceConfig = {
WorkingDirectory = cfg.dataDir;
@@ -58,7 +58,7 @@ in
in {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \
${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter \
--config.file=${escapeShellArg configFile} \
--log.format=${escapeShellArg cfg.logFormat} \
--log.level=${cfg.logLevel} \
@@ -118,7 +118,7 @@ in {
serviceConfig = {
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package.bin}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}";
ExecStart = "${cfg.package}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}";
};
};
+4 -4
View File
@@ -179,15 +179,15 @@ in
(filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc);
serviceConfig = {
ExecStart = "@${cfg.package.bin}/bin/consul consul agent -config-dir /etc/consul.d"
ExecStart = "@${cfg.package}/bin/consul consul agent -config-dir /etc/consul.d"
+ concatMapStrings (n: " -config-file ${n}") configFiles;
ExecReload = "${cfg.package.bin}/bin/consul reload";
ExecReload = "${cfg.package}/bin/consul reload";
PermissionsStartOnly = true;
User = if cfg.dropPrivileges then "consul" else null;
Restart = "on-failure";
TimeoutStartSec = "infinity";
} // (optionalAttrs (cfg.leaveOnStop) {
ExecStop = "${cfg.package.bin}/bin/consul leave";
ExecStop = "${cfg.package}/bin/consul leave";
});
path = with pkgs; [ iproute gnugrep gawk consul ];
@@ -238,7 +238,7 @@ in
serviceConfig = {
ExecStart = ''
${cfg.alerts.package.bin}/bin/consul-alerts start \
${cfg.alerts.package}/bin/consul-alerts start \
--alert-addr=${cfg.alerts.listenAddr} \
--consul-addr=${cfg.alerts.consulAddr} \
${optionalString cfg.alerts.watchChecks "--watch-checks"} \
@@ -19,8 +19,8 @@ in {
package = mkOption {
description = "Package to use for flannel";
type = types.package;
default = pkgs.flannel.bin;
defaultText = "pkgs.flannel.bin";
default = pkgs.flannel;
defaultText = "pkgs.flannel";
};
publicIp = mkOption {
@@ -167,7 +167,7 @@ in {
touch /run/flannel/docker
'' + optionalString (cfg.storageBackend == "etcd") ''
echo "setting network configuration"
until ${pkgs.etcdctl.bin}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
do
echo "setting network configuration, retry"
sleep 1
+1 -1
View File
@@ -83,7 +83,7 @@ in {
SKYDNS_NAMESERVERS = concatStringsSep "," cfg.nameservers;
};
serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/skydns";
ExecStart = "${cfg.package}/bin/skydns";
};
};
@@ -43,12 +43,12 @@ in {
description = "Provide EC2 instance credentials to machines outside of EC2";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
preStart = ''
/run/current-system/sw/bin/rm -fv /run/hologram.sock
'';
serviceConfig = {
ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";
ExecStart = "${pkgs.hologram}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";
};
};
@@ -123,7 +123,7 @@ in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}";
ExecStart = "${pkgs.hologram}/bin/hologram-server --debug --conf ${cfgFile}";
};
};
};
@@ -577,7 +577,7 @@ in
serviceConfig = {
User = "oauth2_proxy";
Restart = "always";
ExecStart = "${cfg.package.bin}/bin/oauth2_proxy ${configString}";
ExecStart = "${cfg.package}/bin/oauth2_proxy ${configString}";
EnvironmentFile = mkIf (cfg.keyFile != null) cfg.keyFile;
};
};
@@ -224,7 +224,7 @@ in
serviceConfig = {
User = "nobody";
Group = "nogroup";
ExecStart = "${pkgs.matterircd.bin}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}";
ExecStart = "${pkgs.matterircd}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}";
WorkingDirectory = "/tmp";
PrivateTmp = true;
Restart = "always";
+1 -2
View File
@@ -38,9 +38,8 @@ in {
if [ ! -z "$ECS_DATADIR" ]; then
mkdir -p "$ECS_DATADIR"
fi
${cfg.package.bin}/bin/agent
${cfg.package}/bin/agent
'';
};
};
}
+1 -1
View File
@@ -108,7 +108,7 @@ in
'';
serviceConfig = {
ExecStart = "@${cfg.package.bin}/bin/lxd lxd --group lxd";
ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd";
Type = "simple";
KillMode = "process"; # when stopping, leave the containers alone
LimitMEMLOCK = "infinity";
+2 -2
View File
@@ -29,8 +29,8 @@ buildGoPackage rec {
'';
installPhase = ''
mkdir -pv $bin/bin
cp -v dcrwallet $bin/bin
mkdir -pv $out/bin
cp -v dcrwallet $out/bin
'';
+2 -2
View File
@@ -21,8 +21,8 @@ buildGoPackage rec {
'';
installPhase = ''
mkdir -pv $bin/bin
cp -v build/bin/geth build/bin/bootnode build/bin/swarm $bin/bin
mkdir -pv $out/bin
cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin
'';
meta = with stdenv.lib; {
+1 -1
View File
@@ -8,7 +8,7 @@ buildGoPackage rec {
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}"
wrapProgram "$out/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}"
'';
src = fetchFromGitHub {
@@ -126,8 +126,8 @@ let
installPhase = ''
pushd go/src/${goPackagePath}
mkdir -p "$bin/bin"
install -m 0755 -t "$bin/bin" ./bin/*
mkdir -p "$out/bin"
install -m 0755 -t "$out/bin" ./bin/*
popd
'';
@@ -181,8 +181,8 @@ let
installPhase = ''
pushd go/src/${goPackagePath}
mkdir -p "$bin/bin"
install -m 0755 -t "$bin/bin" ./dist/artifacts/k3s
mkdir -p "$out/bin"
install -m 0755 -t "$out/bin" ./dist/artifacts/k3s
popd
'';
@@ -16,7 +16,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
for shell in bash zsh; do
$bin/bin/kompose completion $shell > kompose.$shell
$out/bin/kompose completion $shell > kompose.$shell
installShellCompletion kompose.$shell
done
'';
@@ -34,7 +34,7 @@ let
postInstall = ''
for shell in bash zsh; do
$bin/bin/kops completion $shell > kops.$shell
$out/bin/kops completion $shell > kops.$shell
installShellCompletion kops.$shell
done
'';
@@ -48,7 +48,7 @@ in buildGoPackage rec {
'';
postInstall = ''
wrapProgram "$bin/bin/minishift" \
wrapProgram "$out/bin/minishift" \
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}'
'';
@@ -61,8 +61,8 @@ in buildGoPackage rec {
'';
installPhase = ''
mkdir -p $bin/bin
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/"
mkdir -p $out/bin
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/"
installShellCompletion --bash contrib/completions/bash/*
installShellCompletion --zsh contrib/completions/zsh/*
'';
@@ -20,7 +20,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ];
postInstall =
let stern = if isCrossBuild then buildPackages.stern else "$bin"; in
let stern = if isCrossBuild then buildPackages.stern else "$out"; in
''
for shell in bash zsh; do
${stern}/bin/stern --completion $shell > stern.$shell
@@ -26,7 +26,7 @@ let
postInstall = ''
# remove all plugins, they are part of the main binary now
for i in $bin/bin/*; do
for i in $out/bin/*; do
if [[ $(basename $i) != terraform ]]; then
rm "$i"
fi
@@ -88,7 +88,7 @@ let
buildCommand = ''
mkdir -p $out/bin/
makeWrapper "${terraform.bin}/bin/terraform" "$out/bin/terraform" \
makeWrapper "${terraform}/bin/terraform" "$out/bin/terraform" \
--set NIX_TERRAFORM_PLUGIN_DIR "${
buildEnv {
name = "tf-plugin-env";
@@ -23,7 +23,7 @@ buildGoPackage rec {
'';
postInstall = ''
wrapProgram $bin/bin/terragrunt \
wrapProgram $out/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform
'';
@@ -15,7 +15,7 @@ buildGoPackage rec {
subPackages = [ "." ];
outputs = [ "bin" "out" "man" ];
outputs = [ "out" "man" ];
nativeBuildInputs = [ installShellFiles ];
@@ -23,7 +23,7 @@ buildGoPackage rec {
let
rcloneBin =
if stdenv.buildPlatform == stdenv.hostPlatform
then "$bin"
then "$out"
else stdenv.lib.getBin buildPackages.rclone;
in
''
@@ -36,7 +36,7 @@ buildGoPackage {
installPhase = ''
runHook preInstall
install -D grv $bin/bin/grv
install -D grv $out/bin/grv
runHook postInstall
'';
@@ -44,7 +44,7 @@ buildGoPackage rec {
)
'';
outputs = [ "bin" "out" "data" ];
outputs = [ "out" "data" ];
postInstall = ''
mkdir $data
@@ -52,7 +52,7 @@ buildGoPackage rec {
mkdir -p $out
cp -R ./go/src/${goPackagePath}/options/locale $out/locale
wrapProgram $bin/bin/gitea \
wrapProgram $out/bin/gitea \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
'';
@@ -65,7 +65,7 @@ in buildGoPackage rec {
"'/run/gitlab/shell-config.yml'"
'';
outputs = [ "bin" "out" "ruby" ];
outputs = [ "out" "ruby" ];
meta = with stdenv.lib; {
homepage = "https://gitlab.com/gitlab-org/gitaly";
@@ -18,8 +18,8 @@ buildGoPackage rec {
goDeps = ./deps.nix;
postInstall = ''
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $out/bin
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $out/
'';
meta = with stdenv.lib; {
@@ -34,13 +34,13 @@ buildGoPackage rec {
( optional sqliteSupport "sqlite"
++ optional pamSupport "pam");
outputs = [ "bin" "out" "data" ];
outputs = [ "out" "data" ];
postInstall = ''
mkdir $data
cp -R $src/{public,templates} $data
wrapProgram $bin/bin/gogs \
wrapProgram $out/bin/gogs \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
'';
@@ -14,7 +14,7 @@ buildGoPackage rec {
};
goPackagePath = "github.com/containerd/containerd";
outputs = [ "bin" "out" "man" ];
outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man utillinux ];
@@ -33,7 +33,7 @@ buildGoPackage rec {
installPhase = ''
for b in bin/*; do
install -Dm555 $b $bin/$b
install -Dm555 $b $out/$b
done
make man
@@ -30,7 +30,6 @@ buildGoPackage rec {
sha256 = "142flmv54pj48rjqkd26fbxrcbx2cv6pdmrc33jgyvn6r99zliah";
};
outputs = [ "bin" "out" ];
nativeBuildInputs = [ git pkgconfig which ];
buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror
libseccomp libselinux lvm2 ]
@@ -43,9 +42,9 @@ buildGoPackage rec {
make binaries BUILDTAGS="$BUILDTAGS"
'';
installPhase = ''
install -Dm755 bin/crio $bin/bin/crio${flavor}
install -Dm755 bin/crio-status $bin/bin/crio-status${flavor}
install -Dm755 bin/pinns $bin/bin/pinns${flavor}
install -Dm755 bin/crio $out/bin/crio${flavor}
install -Dm755 bin/crio-status $out/bin/crio-status${flavor}
install -Dm755 bin/pinns $out/bin/pinns${flavor}
'';
meta = with stdenv.lib; {
@@ -33,7 +33,7 @@ buildGoPackage rec {
# docker-slim tries to create its state dir next to the binary (inside the nix
# store), so we set it to use the working directory at the time of invocation
postInstall = ''
wrapProgram "$bin/bin/docker-slim" --add-flags '--state-path "$(pwd)"'
wrapProgram "$out/bin/docker-slim" --add-flags '--state-path "$(pwd)"'
'';
meta = with stdenv.lib; {
@@ -16,7 +16,7 @@ buildGoPackage rec {
goDeps = null;
installPhase = ''
install -m755 -D ./go/bin/proxy $bin/bin/docker-proxy
install -m755 -D ./go/bin/proxy $out/bin/docker-proxy
'';
meta = with stdenv.lib; {
@@ -25,7 +25,7 @@ buildGoPackage rec {
goPackagePath = "github.com/containers/libpod";
outputs = [ "bin" "out" "man" ];
outputs = [ "out" "man" ];
nativeBuildInputs = [ pkg-config go-md2man installShellFiles ];
@@ -40,7 +40,7 @@ buildGoPackage rec {
'';
installPhase = ''
install -Dm555 bin/podman $bin/bin/podman
install -Dm555 bin/podman $out/bin/podman
installShellCompletion --bash completions/bash/podman
installShellCompletion --zsh completions/zsh/_podman
MANDIR=$man/share/man make install.man
@@ -43,7 +43,12 @@ in runCommand podman.name {
];
} ''
ln -s ${podman.man} $man
# Symlink everything but $out from podman-unwrapped
${
lib.concatMapStringsSep "\n"
(o: "ln -s ${podman.${o}} ${placeholder o}")
(builtins.filter (o: o != "out")
podman.outputs)}
mkdir -p $out/bin
ln -s ${podman-unwrapped}/share $out/share
@@ -22,7 +22,7 @@ buildGoPackage rec {
};
goPackagePath = "github.com/opencontainers/runc";
outputs = [ "bin" "out" "man" ];
outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ];
buildInputs = [ libseccomp libapparmor apparmor-parser ];
@@ -38,7 +38,7 @@ buildGoPackage rec {
'';
installPhase = ''
install -Dm755 runc $bin/bin/runc
install -Dm755 runc $out/bin/runc
installManPage man/*/*
'';
@@ -42,7 +42,7 @@ buildGoPackage rec {
patchShebangs .
sed -i 's|defaultPath := "[^"]*"|defaultPath := "${stdenv.lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go
./mconfig -V ${version} -p $bin --localstatedir=/var
./mconfig -V ${version} -p $out --localstatedir=/var
# Don't install SUID binaries
sed -i 's/-m 4755/-m 755/g' builddir/Makefile
@@ -54,16 +54,16 @@ buildGoPackage rec {
'';
installPhase = ''
make -C builddir install LOCALSTATEDIR=$bin/var
chmod 755 $bin/libexec/singularity/bin/starter-suid
wrapProgram $bin/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs}
make -C builddir install LOCALSTATEDIR=$out/var
chmod 755 $out/libexec/singularity/bin/starter-suid
wrapProgram $out/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs}
'';
postFixup = ''
find $bin/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true
find $out/libexec/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true
# These etc scripts shouldn't have their paths patched
cp etc/actions/* $bin/etc/singularity/actions/
cp etc/actions/* $out/etc/singularity/actions/
'';
meta = with stdenv.lib; {
@@ -85,7 +85,7 @@ stdenv.mkDerivation {
inherit targetPrefix infixSalt;
outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ];
outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info");
passthru = {
inherit bintools libc nativeTools nativeLibc nativePrefix;
@@ -259,14 +259,15 @@ stdenv.mkDerivation {
printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
''
+ optionalString propagateDoc ''
+ optionalString propagateDoc (''
##
## Man page and info support
##
ln -s ${bintools.man} $man
'' + optionalString (bintools ? info) ''
ln -s ${bintools.info} $info
''
'')
+ ''
##
@@ -0,0 +1,67 @@
{ stdenv, fetchFromGitHub, fontforge, python3 }:
let
inherit (python3.pkgs) fonttools;
common =
{ version, repo, sha256, nativeBuildInputs, postPatch ? null }:
stdenv.mkDerivation rec {
pname = "liberation-fonts";
inherit version;
src = fetchFromGitHub {
owner = "liberationfonts";
rev = version;
inherit repo sha256;
};
inherit nativeBuildInputs postPatch;
installPhase = ''
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
install -m444 -Dt $out/share/doc/${pname}-${version} AUTHORS || true
install -m444 -Dt $out/share/doc/${pname}-${version} ChangeLog || true
install -m444 -Dt $out/share/doc/${pname}-${version} COPYING || true
install -m444 -Dt $out/share/doc/${pname}-${version} License.txt || true
install -m444 -Dt $out/share/doc/${pname}-${version} README || true
'';
meta = with stdenv.lib; {
description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
longDescription = ''
The Liberation Fonts are intended to be replacements for the three most
commonly used fonts on Microsoft systems: Times New Roman, Arial, and
Courier New. Since 2012 they are based on croscore fonts.
There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
(a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
Bitstream Vera Sans Mono).
'';
license = licenses.ofl;
homepage = "https://github.com/liberationfonts";
maintainers = with maintainers; [ raskin ];
};
};
in
{
liberation_ttf_v1 = common {
repo = "liberation-1.7-fonts";
version = "1.07.5";
nativeBuildInputs = [ fontforge ];
sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v";
};
liberation_ttf_v2 = common {
repo = "liberation-fonts";
version = "2.1.0";
nativeBuildInputs = [ fontforge fonttools ];
postPatch = ''
substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
'font = ttLib.TTFont(fontfile)' \
'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
'';
sha256 = "03xpzaas264x5n6qisxkhc68pkpn32m7y78qdm3rdkxdwi8mv8mz";
};
}
@@ -1,70 +0,0 @@
{ stdenv, fetchFromGitHub, fontforge, python3 }:
let
inherit (python3.pkgs) fonttools;
common =
{ version, repo, sha256, nativeBuildInputs, postPatch ? null }:
stdenv.mkDerivation rec {
pname = "liberation-fonts";
inherit version;
src = fetchFromGitHub {
owner = "liberationfonts";
rev = version;
inherit repo sha256;
};
inherit nativeBuildInputs postPatch;
installPhase = ''
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
install -m444 -Dt $out/share/doc/${pname}-${version} AUTHORS || true
install -m444 -Dt $out/share/doc/${pname}-${version} ChangeLog || true
install -m444 -Dt $out/share/doc/${pname}-${version} COPYING || true
install -m444 -Dt $out/share/doc/${pname}-${version} License.txt || true
install -m444 -Dt $out/share/doc/${pname}-${version} README || true
'';
meta = with stdenv.lib; {
description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
longDescription = ''
The Liberation Fonts are intended to be replacements for the three most
commonly used fonts on Microsoft systems: Times New Roman, Arial, and
Courier New. Since 2012 they are based on croscore fonts.
There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
(a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
Bitstream Vera Sans Mono).
'';
license = licenses.ofl;
homepage = "https://github.com/liberationfonts";
maintainers = [
maintainers.raskin
];
};
};
in {
liberation_ttf_v1 = common {
repo = "liberation-1.7-fonts";
version = "1.07.5";
nativeBuildInputs = [ fontforge ];
sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v";
};
liberation_ttf_v2 = common {
repo = "liberation-fonts";
version = "2.00.4";
nativeBuildInputs = [ fontforge fonttools ];
postPatch = ''
substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
'font = ttLib.TTFont(fontfile)' \
'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
'';
sha256 = "14bn1zlhyr4qaz5z2sx4h115pnbd41ix1vky8fxm2lx76xrjjiaa";
};
}
+2 -2
View File
@@ -1,11 +1,11 @@
{ stdenv, fetchzip }:
let
version = "20190731";
version = "20200407";
in fetchzip {
name = "iana-etc-${version}";
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "0vqr4zm53zn7z75ynmf59xfrlhpyk8f41xd6i4v8j0f7k6hfdvpi";
sha256 = "1zmqim0l4lz5xbq7w2wi48fzsvg2msyw6c80dzw4vxll31frpy18";
postFetch = ''
tar -xzvf $downloadedFile --strip-components=1
+1 -3
View File
@@ -37,8 +37,6 @@ buildGoPackage rec {
goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [
pkgconfig
deepin-gettext-tools # build
@@ -109,7 +107,7 @@ buildGoPackage rec {
installPhase = ''
make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath}
mv $out/share/gocode $out/share/go
remove-references-to -t ${go} $out/bin/* $out/lib/deepin-api/*
remove-references-to -t ${go} $out/lib/deepin-api/*
'';
postFixup = ''
@@ -29,8 +29,6 @@ buildGoPackage rec {
goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [
pkgconfig
dbus-factory
+1 -3
View File
@@ -22,8 +22,6 @@ buildGoPackage rec {
goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [
pkgconfig
dbus-factory
@@ -114,7 +112,7 @@ buildGoPackage rec {
installPhase = ''
make install PREFIX="$out" -C go/src/${goPackagePath}
rm -rf $out/share/lightdm # this is uselesss for NixOS
remove-references-to -t ${go} $out/bin/* $out/sbin/*
remove-references-to -t ${go} $out/sbin/*
'';
postFixup = ''
@@ -55,7 +55,10 @@ stdenv.mkDerivation rec {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) ''
@@ -160,6 +160,7 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
@@ -54,7 +54,10 @@ stdenv.mkDerivation {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) ''
@@ -147,6 +147,7 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
@@ -55,7 +55,10 @@ stdenv.mkDerivation {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) ''
@@ -169,6 +169,7 @@ in stdenv.mkDerivation ({
enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
@@ -55,7 +55,10 @@ stdenv.mkDerivation {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) ''
@@ -144,6 +144,7 @@ in stdenv.mkDerivation ({
enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
@@ -54,7 +54,10 @@ stdenv.mkDerivation rec {
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = ''
substituteInPlace cmake/builtin-config-ix.cmake \
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) ''
@@ -161,6 +161,7 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
@@ -203,15 +203,15 @@ let
installPhase = args.installPhase or ''
runHook preInstall
mkdir -p $bin
mkdir -p $out
dir="$NIX_BUILD_TOP/go/bin"
[ -e "$dir" ] && cp -r $dir $bin
[ -e "$dir" ] && cp -r $dir $out
runHook postInstall
'';
preFixup = preFixup + ''
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
'';
strictDeps = true;
@@ -235,9 +235,6 @@ let
enableParallelBuilding = enableParallelBuilding;
# I prefer to call this dev but propagatedBuildInputs expects $out to exist
outputs = args.outputs or [ "bin" "out" ];
meta = {
# Add default meta information
homepage = "https://${goPackagePath}";
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "c-blosc";
version = "1.17.1";
version = "1.18.1";
src = fetchFromGitHub {
owner = "Blosc";
repo = "c-blosc";
rev = "v${version}";
sha256 = "1asp3xmbvdnz1mj1pl1ykzz61cybvkxz3cdn43zh1z0x1qlgwm80";
sha256 = "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70";
};
buildInputs = [ cmake ];
+2 -2
View File
@@ -4,11 +4,11 @@
with stdenv.lib;
stdenv.mkDerivation rec {
name = "glew-2.1.0";
name = "glew-2.2.0";
src = fetchurl {
url = "mirror://sourceforge/glew/${name}.tgz";
sha256 = "159wk5dc0ykjbxvag5i1m2mhp23zkk6ra04l26y3jc3nwvkr3ph4";
sha256 = "1qak8f7g1iswgswrgkzc7idk7jmqgwrs58fhg2ai007v7j4q5z6l";
};
outputs = [ "bin" "out" "dev" "doc" ];
@@ -18,7 +18,14 @@ giDiscoverSelf() {
fi
}
preFixupHooks+=(giDiscoverSelf)
# gappsWrapperArgsHook expects GI_TYPELIB_PATH variable to be set by this.
# Until we have dependency mechanism in generic builder, we need to use this ugly hack.
if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then
preFixupPhases+=" "
preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / giDiscoverSelf gappsWrapperArgsHook }"
else
preFixupPhases+=" giDiscoverSelf"
fi
_multioutMoveGlibGir() {
moveToOutput share/gir-1.0 "${!outputDev}"
@@ -106,6 +106,10 @@ in stdenv.mkDerivation rec {
./fix_pkgconfig_includedir.patch
];
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/950
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1235
postPatch = "sed '/^ opencv_dep =/s/< 4\.2\.0/< 4.4.0/' -i ext/opencv/meson.build";
nativeBuildInputs = [
meson
ninja
+14 -4
View File
@@ -48,7 +48,7 @@ with stdenv.lib;
stdenv.mkDerivation rec {
pname = "gtk+3";
version = "3.24.18";
version = "3.24.20";
outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc";
outputBin = "dev";
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
sha256 = "1lia2ybd1661j6mvrc00iyd50gm7sy157bdzlyf4mr028rzzzspm";
sha256 = "Laxp9xbo0EunqVCRWJ4rquyV3KzpMssVg5Fj20ebHfM=";
};
patches = [
@@ -71,12 +71,17 @@ stdenv.mkDerivation rec {
sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p";
})
# https://gitlab.gnome.org/GNOME/gtk/merge_requests/1002
./patches/01-build-Fix-path-handling-in-pkgconfig.patch
# Fix path handling in pkg-config
# https://gitlab.gnome.org/GNOME/gtk/merge_requests/1793
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gtk/commit/6d9db8610eff8c12d594d53b7813d9eea1247801.patch";
sha256 = "QHseZWgPlZBDEM2dIVixUJkGZMCaYjahkLmSCqCcoWU=";
})
] ++ optionals stdenv.isDarwin [
# X11 module requires <gio/gdesktopappinfo.h> which is not installed on Darwin
# lets drop that dependency in similar way to how other parts of the library do it
# e.g. https://gitlab.gnome.org/GNOME/gtk/blob/3.24.4/gtk/gtk-launch.c#L31-33
# https://gitlab.gnome.org/GNOME/gtk/merge_requests/536
./patches/3.0-darwin-x11.patch
];
@@ -92,6 +97,11 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS";
postPatch = ''
# TODO: Remove in 3.24.21
# https://gitlab.gnome.org/GNOME/gtk/issues/2669
echo "${stdenv.shell}" > check-version.py
chmod +x check-version.py
files=(
build-aux/meson/post-install.py
demos/gtk-demo/geninclude.py
@@ -1,30 +0,0 @@
From 7b692e618c4183a51af3d3b0037f106c4fec2355 Mon Sep 17 00:00:00 2001
From: worldofpeace <worldofpeace@protonmail.ch>
Date: Fri, 19 Jul 2019 13:32:57 -0400
Subject: [PATCH] build: Fix path handling in pkgconfig
---
meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 36913b3f04..161b378ba5 100644
--- a/meson.build
+++ b/meson.build
@@ -834,10 +834,10 @@ configure_file(input: 'config.h.meson',
# pkg-config files - bit of a mess all of this
pkgconf = configuration_data()
-pkgconf.set('prefix', get_option('prefix'))
+pkgconf.set('prefix', gtk_prefix)
pkgconf.set('exec_prefix', '${prefix}')
-pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir')))
-pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir')))
+pkgconf.set('libdir', gtk_libdir)
+pkgconf.set('includedir', join_paths('${prefix}', gtk_includedir))
pkgconf.set('GTK_API_VERSION', gtk_api_version)
pkgconf.set('VERSION', meson.project_version())
pkgconf.set('GTK_BINARY_VERSION', gtk_binary_version)
--
2.22.0
+9 -17
View File
@@ -1,9 +1,13 @@
{ stdenv, lib, buildPackages, automake, autoconf, libtool, which,
fetchpatch, openexr }:
{ stdenv
, buildPackages
, cmake
, libtool
, openexr
}:
stdenv.mkDerivation rec {
pname = "ilmbase";
version = lib.getVersion openexr;
version = stdenv.lib.getVersion openexr;
# the project no longer provides separate tarballs. We may even want to merge
# the ilmbase package into openexr in the future.
@@ -13,22 +17,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
preConfigure = ''
patchShebangs ./bootstrap
./bootstrap
'';
# otherwise, the pkgconfig info for the libraries will not match the filenames
configureFlags = stdenv.lib.optionalString stdenv.isDarwin "--enable-namespaceversioning=no";
nativeBuildInputs = [ cmake libtool ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ automake autoconf libtool which ];
NIX_CFLAGS_LINK = "-pthread";
patches = [
./cross.patch
];
patches = [ ./cross.patch ];
# fails 1 out of 1 tests with
# "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed"
@@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
NIX_CFLAGS_COMPILE = "-fno-lto";
meta = with stdenv.lib; {
@@ -22,6 +22,14 @@ stdenv.mkDerivation rec {
buildInputs = [ hidapi libcbor openssl ]
++ stdenv.lib.optionals stdenv.isLinux [ udev ];
patches = [
# make build reproducible
(fetchpatch {
url = "https://github.com/Yubico/libfido2/commit/e79f7d7996e70d6b2ae9826fce81d61659cab4f6.patch";
sha256 = "0jwg69f95qqf0ym24q1ka50d3d3338cyw4fdfzpw4sab0shiaq9v";
})
];
cmakeFlags = [
"-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d"
"-DUSE_HIDAPI=1"
@@ -2,34 +2,18 @@
stdenv.mkDerivation rec {
pname = "libglvnd";
version = "1.2.0";
version = "1.3.1";
src = fetchFromGitHub {
owner = "NVIDIA";
repo = "libglvnd";
rev = "v${version}";
sha256 = "1hyywwjsmvsd7di603f7iznjlccqlc7yvz0j59gax7bljm9wb6ni";
sha256 = "0mkzdzdxjxjl794rblq4mq33wmb8ikqmfswbqdbr8gw2kw4wlhdl";
};
nativeBuildInputs = [ autoreconfHook pkgconfig python3 addOpenGLRunpath ];
buildInputs = [ libX11 libXext xorgproto ];
# The following 3 patches should be removed once libglvnd >1.2.0 is released
patches = [
(fetchpatch {
url = "https://github.com/NVIDIA/libglvnd/commit/6f52473dac08c44b081b792874b4ce73122096da.patch";
sha256 = "0rd9ihl8n33cm0rya5a7ki0hn31fh52r0gaj5d4w80jrsah2ayij";
})
(fetchpatch {
url = "https://github.com/NVIDIA/libglvnd/commit/51233cc52cbcbe25f8461830913c06f5b5bc9508.patch";
sha256 = "1qx3nw8vq5xcrixmi7xw1vpy4gbf7kmx38rx8wg8x046g4mv8ijj";
})
(fetchpatch {
url = "https://github.com/NVIDIA/libglvnd/commit/5dfdc5a6dc60a3bdc63cd4510dabacba388da13a.patch";
sha256 = "0gmb3619yz3z7n22afjh8p2y13bmsky4r0z0csm14is3wvdi64ya";
})
];
postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace src/GLX/Makefile.am \
--replace "-Wl,-Bsymbolic " ""
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "libssh";
version = "0.8.8";
version = "0.8.9";
src = fetchurl {
url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz";
sha256 = "1qk5bm9r6199jbfk54f8w24vkl52051g8s3kmq4z2kdc6vbpy4jb";
sha256 = "09b8w9m5qiap8wbvz4613nglsynpk8hn0q9b929ny2y4l2fy2nc5";
};
postPatch = ''
@@ -12,12 +12,12 @@ stdenv.mkDerivation rec {
patches = [
(fetchpatch {
url = "https://gitlab.xiph.org/xiph/vorbis/uploads/a68cf70fa10c8081a633f77b5c6576b7/0001-CVE-2017-14160-make-sure-we-don-t-overflow.patch";
sha256 = "0v21p59cb3z77ch1v6q5dcrd733h91f3m8ifnd7kkkr8gzn17d5x";
url = "https://gitlab.xiph.org/xiph/vorbis/commit/018ca26dece618457dd13585cad52941193c4a25.patch";
sha256 = "18k4vp0nmrxxpis641ylnw6dgwxrymh5bf74njr6v8dizmmz1bkj";
name = "CVE-2017-14160+CVE-2018-10393.patch";
})
(fetchpatch {
url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaa.diff";
url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaacad51305e1464d4b381dabad0e88b.diff";
sha256 = "1k77y3q36npy8mkkz40f6cb46l2ldrwyrd191m29s8rnbhnafdf7";
name = "CVE-2018-10392.patch";
})
@@ -1,10 +1,10 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "3.5.1";
version = "3.6";
src = fetchurl {
url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
sha256 = "06clvkdfxhlbagn4afssylmn5vrak59dlmnvy8b2xc31hycs3k3m";
sha256 = "1wg3sprl0bzy49cmbwwm91vw67hk1x5i3ksdygsciyxz587hsk6j";
};
})
+8 -6
View File
@@ -38,20 +38,20 @@
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
let
version = "4.1.2";
version = "4.3.0";
src = fetchFromGitHub {
owner = "opencv";
repo = "opencv";
rev = version;
sha256 = "0c98ziwvfrzdzwn52a36d37n5rac8zmxq2jn479bzfaii1bib8xx";
sha256 = "1r9bq9p1x99g2y8jvj9428sgqvljz75dm5vrfsma7hh5wjhz9775";
};
contribSrc = fetchFromGitHub {
owner = "opencv";
repo = "opencv_contrib";
rev = version;
sha256 = "10ryyxhggin5dk5glf4ycyrfryqf50f4bs10biv6nxlrrinm2di4";
sha256 = "068b4f95rlryab3mffxs2w6dnbmbhrnpsdgl007rxk4bwnz29y49";
};
# Contrib must be built in order to enable Tesseract support:
@@ -62,8 +62,8 @@ let
src = fetchFromGitHub {
owner = "opencv";
repo = "opencv_3rdparty";
rev = "32e315a5b106a7b89dbed51c28f8120a48b368b4";
sha256 = "19w9f0r16072s59diqxsr5q6nmwyz9gnxjs49nglzhd66p3ddbkp";
rev = "a56b6ac6f030c312b2dce17430eef13aed9af274";
sha256 = "1msbkc3zixx61rcg6a04i1bcfhw1phgsrh93glq1n80hgsk3nbjq";
} + "/ippicv";
files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in
if stdenv.hostPlatform.system == "x86_64-linux" then
@@ -168,7 +168,9 @@ stdenv.mkDerivation {
# Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
# what appears to be some stray headers in dnn/misc/tensorflow
# in contrib when generating the Python bindings:
patches = lib.optional enableCuda ./cuda_opt_flow.patch;
patches = [
./cmake-don-t-use-OpenCVFindOpenEXR.patch
] ++ lib.optional enableCuda ./cuda_opt_flow.patch;
postPatch = ''
sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt
sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py
@@ -0,0 +1,55 @@
From 6d988c08e852379a163ecd20df8639196d84d014 Mon Sep 17 00:00:00 2001
From: Bernardo Meurer <meurerbernardo@gmail.com>
Date: Sun, 26 Apr 2020 14:50:25 -0700
Subject: [PATCH] cmake: don't use OpenCVFindOpenEXR
Use find_package for this.
---
CMakeLists.txt | 2 ++
cmake/OpenCVFindLibsGrfmt.cmake | 15 +++------------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c0b3880fc..0360469350 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,8 @@ FATAL: In-source builds are not allowed.
")
endif()
+# the future!
+include(FindPkgConfig)
include(cmake/OpenCVMinDepVersions.cmake)
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
index 0beaf19317..4c5e46e615 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -227,20 +227,11 @@ endif()
# --- OpenEXR (optional) ---
if(WITH_OPENEXR)
ocv_clear_vars(HAVE_OPENEXR)
- if(NOT BUILD_OPENEXR)
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
- endif()
-
+ pkg_check_modules(OPENEXR OpenEXR)
if(OPENEXR_FOUND)
set(HAVE_OPENEXR YES)
- else()
- ocv_clear_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
-
- set(OPENEXR_LIBRARIES IlmImf)
- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr")
- if(OPENEXR_VERSION) # check via TARGET doesn't work
- set(HAVE_OPENEXR YES)
- endif()
+ set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_DIRS})
+ set(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES})
endif()
endif()
--
2.26.1
+11 -37
View File
@@ -1,11 +1,13 @@
{ lib, stdenv, buildPackages, fetchFromGitHub, autoconf, automake, libtool, pkgconfig,
zlib, ilmbase, fetchpatch }:
let
# Doesn't really do anything when not crosscompiling
emulator = stdenv.hostPlatform.emulator buildPackages;
in
{ lib
, stdenv
, buildPackages
, fetchFromGitHub
, zlib
, ilmbase
, fetchpatch
, cmake
, libtool
}:
stdenv.mkDerivation rec {
pname = "openexr";
version = "2.4.1";
@@ -17,39 +19,11 @@ stdenv.mkDerivation rec {
sha256 = "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01";
};
sourceRoot = "source/OpenEXR";
outputs = [ "bin" "dev" "out" "doc" ];
# Needed because there are some generated sources. Solution: just run them under QEMU.
postPatch = ''
for file in b44ExpLogTable dwaLookups
do
# Ecape for both sh and Automake
emu=${lib.escapeShellArg (lib.replaceStrings ["$"] ["$$"] emulator)}
before="./$file > $file.h"
after="$emu $before"
substituteInPlace IlmImf/Makefile.am \
--replace "$before" "$after"
done
# Make sure the patch succeeded
[[ $(grep "$emu" IlmImf/Makefile.am | wc -l) = 2 ]]
'';
preConfigure = ''
patchShebangs ./bootstrap
./bootstrap
'';
# otherwise, the pkgconfig info for the libraries will not match the filenames
configureFlags = stdenv.lib.optionalString stdenv.isDarwin "--enable-namespaceversioning=no";
nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
nativeBuildInputs = [ cmake libtool ];
propagatedBuildInputs = [ ilmbase zlib ];
enableParallelBuilding = true;
doCheck = false; # fails 1 of 1 tests
meta = with stdenv.lib; {
description = "A high dynamic-range (HDR) image file format";
@@ -96,12 +96,12 @@ let
in
stdenv.mkDerivation rec {
pname = "openblas";
version = "0.3.8";
version = "0.3.9";
src = fetchFromGitHub {
owner = "xianyi";
repo = "OpenBLAS";
rev = "v${version}";
sha256 = "0s017qqi4n6jzrxl9cyx625wj26smnyn5g8s699s7h8v1srlrw6p";
sha256 = "0nq51j45shb32n6086xff3x374kx5qhr2cwjzvppx4s2z0ahflal";
};
inherit blas64;
@@ -5,13 +5,17 @@
buildPythonPackage rec {
pname = "certifi";
version = "2019.11.28";
version = "2020.4.5.1";
src = fetchPypi {
inherit pname version;
sha256 = "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f";
sha256 = "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i";
};
pythonImportsCheck = [ "certifi" ];
dontUseSetuptoolsCheck = true;
meta = {
homepage = "https://certifi.io/";
description = "Python package for providing Mozilla's CA Bundle";
@@ -3,7 +3,7 @@
, buildPythonPackage
, fetchFromGitHub
, fsspec
, pytest
, pytestCheckHook
, pythonOlder
, cloudpickle
, numpy
@@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "dask";
version = "2.10.1";
version = "2.14.0";
disabled = pythonOlder "3.5";
@@ -23,13 +23,15 @@ buildPythonPackage rec {
owner = "dask";
repo = pname;
rev = version;
sha256 = "035mr7385yf5ng5wf60qxr80529h8dsla5hymkyg68dxhkd0jvbr";
sha256 = "0kj46pwzvdw8ii1h45y48wxvjid89yp4cfak2h4b8z8xic73fqgj";
};
checkInputs = [
pytest
pytestCheckHook
];
dontUseSetuptoolsCheck = true;
propagatedBuildInputs = [
bokeh
cloudpickle
@@ -50,9 +52,10 @@ buildPythonPackage rec {
--replace "cmdclass=versioneer.get_cmdclass()," ""
'';
checkPhase = ''
pytest
'';
disabledTests = [
"test_argwhere_str"
"test_count_nonzero_str"
];
meta = {
description = "Minimal task scheduling abstraction";
@@ -22,12 +22,12 @@
buildPythonPackage rec {
pname = "ipython";
version = "7.12.0";
version = "7.13.0";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "d9459e7237e2e5858738ff9c3e26504b79899b58a6d49e574d352493d80684c6";
sha256 = "ca478e52ae1f88da0102360e57e528b92f3ae4316aabac80a2cd7f7ab2efb48a";
};
prePatch = lib.optionalString stdenv.isDarwin ''
@@ -12,11 +12,11 @@
buildPythonPackage rec {
pname = "jupyter_client";
version = "5.3.4";
version = "6.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "60e6faec1031d63df57f1cc671ed673dced0ed420f4377ea33db37b1c188b910";
sha256 = "3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756";
};
propagatedBuildInputs = [
@@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "jupyter_core";
version = "4.6.1";
version = "4.6.3";
src = fetchPypi {
inherit pname version;
sha256 = "a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244";
sha256 = "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e";
};
checkInputs = [ pytest mock glibcLocales nose ];
@@ -9,11 +9,11 @@
buildPythonPackage rec {
pname = "line_profiler";
version = "2.1.2";
version = "3.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c";
sha256 = "7218ad6bd81f8649b211974bf108933910f016d66b49651effe7bbf63667d141";
};
patches = [ ./python37.patch ];
@@ -12,11 +12,11 @@
buildPythonPackage rec {
pname = "nbformat";
version = "4.4.0";
version = "5.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "f7494ef0df60766b7cabe0a3651556345a963b74dbc16bc7c18479041170d402";
sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a";
};
LC_ALL="en_US.utf8";
@@ -12,11 +12,11 @@
buildPythonPackage rec {
pname = "nbformat";
version = "5.0.4";
version = "5.0.6";
src = fetchPypi {
inherit pname version;
sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a";
sha256 = "049af048ed76b95c3c44043620c17e56bc001329e07f83fec4f177f0e3d7b757";
};
LC_ALL="en_US.utf8";
@@ -25,11 +25,11 @@
buildPythonPackage rec {
pname = "notebook";
version = "5.7.8";
version = "6.0.3";
src = fetchPypi {
inherit pname version;
sha256 = "573e0ae650c5d76b18b6e564ba6d21bf321d00847de1d215b418acb64f056eb8";
sha256 = "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48";
};
LC_ALL = "en_US.utf8";
@@ -27,13 +27,13 @@ let
};
in buildPythonPackage rec {
pname = "numpy";
version = "1.18.1";
version = "1.18.3";
format = "pyproject.toml";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77";
sha256 = "e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8";
};
nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ];
@@ -14,11 +14,11 @@
buildPythonPackage rec {
pname = "qtconsole";
version = "4.6.0";
version = "4.7.3";
src = fetchPypi {
inherit pname version;
sha256 = "654f423662e7dfe6a9b26fac8ec76aedcf742c339909ac49f1f0c1a1b744bcd1";
sha256 = "8f5ae5571f0e921db9f2d12613ed667c350ee22c7db598d9bbbe143e8533f932";
};
checkInputs = [ nose ] ++ lib.optionals isPy27 [mock];
@@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "reikna";
version = "0.7.4";
version = "0.7.5";
src = fetchPypi {
inherit pname version;
sha256 = "52bbce24fa1fd7bb950d38ce9b60f497dd00ac6b26688d80ab9bce709f063e71";
sha256 = "d01f4264c8379ef2962a93aacb002d491b92ef9b5b22b45f77e7821dfa87bef7";
};
checkInputs = [ sphinx pytestcov pytest ];
@@ -9,11 +9,11 @@
buildPythonPackage rec {
pname = "sounddevice";
version = "0.3.14";
version = "0.3.15";
src = fetchPypi {
inherit pname version;
sha256 = "c7b0f7ad86550668da55404eabcb63d4212ec622fcce86510092306b77d2e80a";
sha256 = "028f6e5df83027f4bfba5d6d61e6d46eb8689f9e647825e09f539920dee17d2c";
};
propagatedBuildInputs = [ cffi numpy portaudio ];
@@ -13,11 +13,11 @@
buildPythonPackage rec {
pname = "statsmodels";
version = "0.11.0";
version = "0.11.1";
src = fetchPypi {
inherit pname version;
sha256 = "0wcc7xbwlf8r2diw9fnzf4bg9h5cg406w7phd3dz37hx17yfi3ha";
sha256 = "5bde3fa0a35a91b45dba7cbc28270b5b649ff1d721c89290883f6e831672d5f0";
};
checkInputs = with self; [ nose ];
@@ -5,12 +5,12 @@
}:
buildPythonPackage rec {
version = "0.8.6";
version = "0.8.7";
pname = "tabulate";
src = fetchPypi {
inherit pname version;
sha256 = "5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8";
sha256 = "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007";
};
checkInputs = [ nose ];

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