Merge staging into staging-next

This commit is contained in:
Frederik Rietdijk 2020-05-01 09:28:45 +02:00
commit 00bbfccecf
176 changed files with 644 additions and 526 deletions

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. 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>
<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> <para>
You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc: You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc:
<screen> <screen>

View File

@ -317,6 +317,11 @@ php.override {
the <literal>notmuch.emacs</literal> output. the <literal>notmuch.emacs</literal> output.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The default output of <literal>buildGoPackage</literal> is now <literal>$out</literal> instead of <literal>$bin</literal>.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>
</section> </section>

View File

@ -51,6 +51,7 @@ in {
rtlwifi_new-firmware rtlwifi_new-firmware
zd1211fw zd1211fw
alsa-firmware alsa-firmware
sof-firmware
openelec-dvb-firmware openelec-dvb-firmware
] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware ] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware
++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [

View File

@ -5,8 +5,8 @@ let
cfg = config.programs.singularity; cfg = config.programs.singularity;
singularity = pkgs.singularity.overrideAttrs (attrs : { singularity = pkgs.singularity.overrideAttrs (attrs : {
installPhase = attrs.installPhase + '' installPhase = attrs.installPhase + ''
mv $bin/libexec/singularity/bin/starter-suid $bin/libexec/singularity/bin/starter-suid.orig mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig
ln -s /run/wrappers/bin/singularity-suid $bin/libexec/singularity/bin/starter-suid ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid
''; '';
}); });
in { in {

View File

@ -127,7 +127,7 @@ in
serviceConfig = { serviceConfig = {
StateDirectory = "gitlab-runner"; StateDirectory = "gitlab-runner";
ExecReload= "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload= "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStart = ''${cfg.package.bin}/bin/gitlab-runner run \ ExecStart = ''${cfg.package}/bin/gitlab-runner run \
--working-directory ${cfg.workDir} \ --working-directory ${cfg.workDir} \
--config /etc/gitlab-runner/config.toml \ --config /etc/gitlab-runner/config.toml \
--service gitlab-runner \ --service gitlab-runner \

View File

@ -75,7 +75,7 @@ in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/confd"; ExecStart = "${cfg.package}/bin/confd";
}; };
}; };

View File

@ -178,7 +178,7 @@ in {
serviceConfig = { serviceConfig = {
Type = "notify"; Type = "notify";
ExecStart = "${pkgs.etcd.bin}/bin/etcd"; ExecStart = "${pkgs.etcd}/bin/etcd";
User = "etcd"; User = "etcd";
LimitNOFILE = 40000; LimitNOFILE = 40000;
}; };

View File

@ -335,7 +335,7 @@ in
description = "gitea"; description = "gitea";
after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service"; after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ gitea.bin pkgs.gitAndTools.git ]; path = [ gitea pkgs.gitAndTools.git ];
preStart = let preStart = let
runConfig = "${cfg.stateDir}/custom/conf/app.ini"; runConfig = "${cfg.stateDir}/custom/conf/app.ini";
@ -347,11 +347,11 @@ in
cp -f ${configFile} ${runConfig} cp -f ${configFile} ${runConfig}
if [ ! -e ${secretKey} ]; then if [ ! -e ${secretKey} ]; then
${gitea.bin}/bin/gitea generate secret SECRET_KEY > ${secretKey} ${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey}
fi fi
if [ ! -e ${jwtSecret} ]; then if [ ! -e ${jwtSecret} ]; then
${gitea.bin}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret} ${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret}
fi fi
KEY="$(head -n1 ${secretKey})" KEY="$(head -n1 ${secretKey})"
@ -374,7 +374,7 @@ in
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*") HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*")
if [ "$HOOKS" ] if [ "$HOOKS" ]
then 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/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/bash,${pkgs.bash}/bin/bash,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
@ -383,7 +383,7 @@ in
# update command option in authorized_keys # update command option in authorized_keys
if [ -r ${cfg.stateDir}/.ssh/authorized_keys ] if [ -r ${cfg.stateDir}/.ssh/authorized_keys ]
then 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 fi
''; '';
@ -392,7 +392,7 @@ in
User = cfg.user; User = cfg.user;
Group = "gitea"; Group = "gitea";
WorkingDirectory = cfg.stateDir; WorkingDirectory = cfg.stateDir;
ExecStart = "${gitea.bin}/bin/gitea web"; ExecStart = "${gitea}/bin/gitea web";
Restart = "always"; Restart = "always";
# Filesystem # Filesystem
@ -450,7 +450,7 @@ in
description = "gitea dump"; description = "gitea dump";
after = [ "gitea.service" ]; after = [ "gitea.service" ];
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
path = [ gitea.bin ]; path = [ gitea ];
environment = { environment = {
USER = cfg.user; USER = cfg.user;
@ -461,7 +461,7 @@ in
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = cfg.user; User = cfg.user;
ExecStart = "${gitea.bin}/bin/gitea dump"; ExecStart = "${gitea}/bin/gitea dump";
WorkingDirectory = cfg.stateDir; WorkingDirectory = cfg.stateDir;
}; };
}; };

View File

@ -200,7 +200,7 @@ in
description = "Gogs (Go Git Service)"; description = "Gogs (Go Git Service)";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ pkgs.gogs.bin ]; path = [ pkgs.gogs ];
preStart = let preStart = let
runConfig = "${cfg.stateDir}/custom/conf/app.ini"; 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/*") HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*")
if [ "$HOOKS" ] if [ "$HOOKS" ]
then 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/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/bash,${pkgs.bash}/bin/bash,g' $HOOKS
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,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; User = cfg.user;
Group = cfg.group; Group = cfg.group;
WorkingDirectory = cfg.stateDir; WorkingDirectory = cfg.stateDir;
ExecStart = "${pkgs.gogs.bin}/bin/gogs web"; ExecStart = "${pkgs.gogs}/bin/gogs web";
Restart = "always"; Restart = "always";
}; };

View File

@ -55,7 +55,7 @@ in
Restart = "on-failure"; Restart = "on-failure";
WorkingDirectory = stateDir; WorkingDirectory = stateDir;
PrivateTmp = true; 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}";
}; };
}; };
}; };

View File

@ -35,7 +35,7 @@ in {
path = [ fake-lsb-release ]; path = [ fake-lsb-release ];
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/agent"; ExecStart = "${cfg.package}/bin/agent";
KillMode = "process"; KillMode = "process";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "15min"; RestartSec = "15min";
@ -43,4 +43,3 @@ in {
}; };
}; };
} }

View File

@ -148,7 +148,7 @@ in {
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
ExecStart = '' ExecStart = ''
${cfg.package.bin}/bin/bosun -c ${configFile} ${cfg.package}/bin/bosun -c ${configFile}
''; '';
}; };
}; };

View File

@ -59,7 +59,7 @@ in {
"-templates ${cfg.templateDir}" "-templates ${cfg.templateDir}"
]; ];
in { in {
ExecStart = "${pkgs.grafana_reporter.bin}/bin/grafana-reporter ${args}"; ExecStart = "${pkgs.grafana_reporter}/bin/grafana-reporter ${args}";
}; };
}; };
}; };

View File

@ -535,7 +535,7 @@ in {
${optionalString cfg.provision.enable '' ${optionalString cfg.provision.enable ''
export GF_PATHS_PROVISIONING=${provisionConfDir}; 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 = { serviceConfig = {
WorkingDirectory = cfg.dataDir; WorkingDirectory = cfg.dataDir;

View File

@ -58,7 +58,7 @@ in
in { in {
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \ ${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter \
--config.file=${escapeShellArg configFile} \ --config.file=${escapeShellArg configFile} \
--log.format=${escapeShellArg cfg.logFormat} \ --log.format=${escapeShellArg cfg.logFormat} \
--log.level=${cfg.logLevel} \ --log.level=${cfg.logLevel} \

View File

@ -118,7 +118,7 @@ in {
serviceConfig = { serviceConfig = {
User = cfg.user; User = cfg.user;
Group = cfg.group; 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}";
}; };
}; };

View File

@ -179,15 +179,15 @@ in
(filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc); (filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc);
serviceConfig = { 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; + concatMapStrings (n: " -config-file ${n}") configFiles;
ExecReload = "${cfg.package.bin}/bin/consul reload"; ExecReload = "${cfg.package}/bin/consul reload";
PermissionsStartOnly = true; PermissionsStartOnly = true;
User = if cfg.dropPrivileges then "consul" else null; User = if cfg.dropPrivileges then "consul" else null;
Restart = "on-failure"; Restart = "on-failure";
TimeoutStartSec = "infinity"; TimeoutStartSec = "infinity";
} // (optionalAttrs (cfg.leaveOnStop) { } // (optionalAttrs (cfg.leaveOnStop) {
ExecStop = "${cfg.package.bin}/bin/consul leave"; ExecStop = "${cfg.package}/bin/consul leave";
}); });
path = with pkgs; [ iproute gnugrep gawk consul ]; path = with pkgs; [ iproute gnugrep gawk consul ];
@ -238,7 +238,7 @@ in
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''
${cfg.alerts.package.bin}/bin/consul-alerts start \ ${cfg.alerts.package}/bin/consul-alerts start \
--alert-addr=${cfg.alerts.listenAddr} \ --alert-addr=${cfg.alerts.listenAddr} \
--consul-addr=${cfg.alerts.consulAddr} \ --consul-addr=${cfg.alerts.consulAddr} \
${optionalString cfg.alerts.watchChecks "--watch-checks"} \ ${optionalString cfg.alerts.watchChecks "--watch-checks"} \

View File

@ -19,8 +19,8 @@ in {
package = mkOption { package = mkOption {
description = "Package to use for flannel"; description = "Package to use for flannel";
type = types.package; type = types.package;
default = pkgs.flannel.bin; default = pkgs.flannel;
defaultText = "pkgs.flannel.bin"; defaultText = "pkgs.flannel";
}; };
publicIp = mkOption { publicIp = mkOption {
@ -167,7 +167,7 @@ in {
touch /run/flannel/docker touch /run/flannel/docker
'' + optionalString (cfg.storageBackend == "etcd") '' '' + optionalString (cfg.storageBackend == "etcd") ''
echo "setting network configuration" 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 do
echo "setting network configuration, retry" echo "setting network configuration, retry"
sleep 1 sleep 1

View File

@ -83,7 +83,7 @@ in {
SKYDNS_NAMESERVERS = concatStringsSep "," cfg.nameservers; SKYDNS_NAMESERVERS = concatStringsSep "," cfg.nameservers;
}; };
serviceConfig = { serviceConfig = {
ExecStart = "${cfg.package.bin}/bin/skydns"; ExecStart = "${cfg.package}/bin/skydns";
}; };
}; };

View File

@ -48,7 +48,7 @@ in {
/run/current-system/sw/bin/rm -fv /run/hologram.sock /run/current-system/sw/bin/rm -fv /run/hologram.sock
''; '';
serviceConfig = { 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}";
}; };
}; };

View File

@ -123,7 +123,7 @@ in {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}"; ExecStart = "${pkgs.hologram}/bin/hologram-server --debug --conf ${cfgFile}";
}; };
}; };
}; };

View File

@ -577,7 +577,7 @@ in
serviceConfig = { serviceConfig = {
User = "oauth2_proxy"; User = "oauth2_proxy";
Restart = "always"; Restart = "always";
ExecStart = "${cfg.package.bin}/bin/oauth2_proxy ${configString}"; ExecStart = "${cfg.package}/bin/oauth2_proxy ${configString}";
EnvironmentFile = mkIf (cfg.keyFile != null) cfg.keyFile; EnvironmentFile = mkIf (cfg.keyFile != null) cfg.keyFile;
}; };
}; };

View File

@ -224,7 +224,7 @@ in
serviceConfig = { serviceConfig = {
User = "nobody"; User = "nobody";
Group = "nogroup"; Group = "nogroup";
ExecStart = "${pkgs.matterircd.bin}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}"; ExecStart = "${pkgs.matterircd}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}";
WorkingDirectory = "/tmp"; WorkingDirectory = "/tmp";
PrivateTmp = true; PrivateTmp = true;
Restart = "always"; Restart = "always";

View File

@ -38,9 +38,8 @@ in {
if [ ! -z "$ECS_DATADIR" ]; then if [ ! -z "$ECS_DATADIR" ]; then
mkdir -p "$ECS_DATADIR" mkdir -p "$ECS_DATADIR"
fi fi
${cfg.package.bin}/bin/agent ${cfg.package}/bin/agent
''; '';
}; };
}; };
} }

View File

@ -108,7 +108,7 @@ in
''; '';
serviceConfig = { serviceConfig = {
ExecStart = "@${cfg.package.bin}/bin/lxd lxd --group lxd"; ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd";
Type = "simple"; Type = "simple";
KillMode = "process"; # when stopping, leave the containers alone KillMode = "process"; # when stopping, leave the containers alone
LimitMEMLOCK = "infinity"; LimitMEMLOCK = "infinity";

View File

@ -29,8 +29,8 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -pv $bin/bin mkdir -pv $out/bin
cp -v dcrwallet $bin/bin cp -v dcrwallet $out/bin
''; '';

View File

@ -21,8 +21,8 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -pv $bin/bin mkdir -pv $out/bin
cp -v build/bin/geth build/bin/bootnode build/bin/swarm $bin/bin cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -8,7 +8,7 @@ buildGoPackage rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}" wrapProgram "$out/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}"
''; '';
src = fetchFromGitHub { src = fetchFromGitHub {

View File

@ -126,8 +126,8 @@ let
installPhase = '' installPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
mkdir -p "$bin/bin" mkdir -p "$out/bin"
install -m 0755 -t "$bin/bin" ./bin/* install -m 0755 -t "$out/bin" ./bin/*
popd popd
''; '';
@ -181,8 +181,8 @@ let
installPhase = '' installPhase = ''
pushd go/src/${goPackagePath} pushd go/src/${goPackagePath}
mkdir -p "$bin/bin" mkdir -p "$out/bin"
install -m 0755 -t "$bin/bin" ./dist/artifacts/k3s install -m 0755 -t "$out/bin" ./dist/artifacts/k3s
popd popd
''; '';

View File

@ -16,7 +16,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/kompose completion $shell > kompose.$shell $out/bin/kompose completion $shell > kompose.$shell
installShellCompletion kompose.$shell installShellCompletion kompose.$shell
done done
''; '';

View File

@ -34,7 +34,7 @@ let
postInstall = '' postInstall = ''
for shell in bash zsh; do for shell in bash zsh; do
$bin/bin/kops completion $shell > kops.$shell $out/bin/kops completion $shell > kops.$shell
installShellCompletion kops.$shell installShellCompletion kops.$shell
done done
''; '';

View File

@ -48,7 +48,7 @@ in buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
wrapProgram "$bin/bin/minishift" \ wrapProgram "$out/bin/minishift" \
--prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}' --prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}'
''; '';

View File

@ -61,8 +61,8 @@ in buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
mkdir -p $bin/bin mkdir -p $out/bin
cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/" cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/"
installShellCompletion --bash contrib/completions/bash/* installShellCompletion --bash contrib/completions/bash/*
installShellCompletion --zsh contrib/completions/zsh/* installShellCompletion --zsh contrib/completions/zsh/*
''; '';

View File

@ -20,7 +20,7 @@ buildGoPackage rec {
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
postInstall = 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 for shell in bash zsh; do
${stern}/bin/stern --completion $shell > stern.$shell ${stern}/bin/stern --completion $shell > stern.$shell

View File

@ -26,7 +26,7 @@ let
postInstall = '' postInstall = ''
# remove all plugins, they are part of the main binary now # 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 if [[ $(basename $i) != terraform ]]; then
rm "$i" rm "$i"
fi fi
@ -88,7 +88,7 @@ let
buildCommand = '' buildCommand = ''
mkdir -p $out/bin/ mkdir -p $out/bin/
makeWrapper "${terraform.bin}/bin/terraform" "$out/bin/terraform" \ makeWrapper "${terraform}/bin/terraform" "$out/bin/terraform" \
--set NIX_TERRAFORM_PLUGIN_DIR "${ --set NIX_TERRAFORM_PLUGIN_DIR "${
buildEnv { buildEnv {
name = "tf-plugin-env"; name = "tf-plugin-env";

View File

@ -23,7 +23,7 @@ buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
wrapProgram $bin/bin/terragrunt \ wrapProgram $out/bin/terragrunt \
--set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform --set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform
''; '';

View File

@ -15,7 +15,7 @@ buildGoPackage rec {
subPackages = [ "." ]; subPackages = [ "." ];
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
@ -23,7 +23,7 @@ buildGoPackage rec {
let let
rcloneBin = rcloneBin =
if stdenv.buildPlatform == stdenv.hostPlatform if stdenv.buildPlatform == stdenv.hostPlatform
then "$bin" then "$out"
else stdenv.lib.getBin buildPackages.rclone; else stdenv.lib.getBin buildPackages.rclone;
in in
'' ''

View File

@ -36,7 +36,7 @@ buildGoPackage {
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
install -D grv $bin/bin/grv install -D grv $out/bin/grv
runHook postInstall runHook postInstall
''; '';

View File

@ -44,7 +44,7 @@ buildGoPackage rec {
) )
''; '';
outputs = [ "bin" "out" "data" ]; outputs = [ "out" "data" ];
postInstall = '' postInstall = ''
mkdir $data mkdir $data
@ -52,7 +52,7 @@ buildGoPackage rec {
mkdir -p $out mkdir -p $out
cp -R ./go/src/${goPackagePath}/options/locale $out/locale cp -R ./go/src/${goPackagePath}/options/locale $out/locale
wrapProgram $bin/bin/gitea \ wrapProgram $out/bin/gitea \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} --prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
''; '';

View File

@ -65,7 +65,7 @@ in buildGoPackage rec {
"'/run/gitlab/shell-config.yml'" "'/run/gitlab/shell-config.yml'"
''; '';
outputs = [ "bin" "out" "ruby" ]; outputs = [ "out" "ruby" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://gitlab.com/gitlab-org/gitaly"; homepage = "https://gitlab.com/gitlab-org/gitaly";

View File

@ -18,8 +18,8 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
postInstall = '' postInstall = ''
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $out/bin
cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/ cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $out/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -34,13 +34,13 @@ buildGoPackage rec {
( optional sqliteSupport "sqlite" ( optional sqliteSupport "sqlite"
++ optional pamSupport "pam"); ++ optional pamSupport "pam");
outputs = [ "bin" "out" "data" ]; outputs = [ "out" "data" ];
postInstall = '' postInstall = ''
mkdir $data mkdir $data
cp -R $src/{public,templates} $data cp -R $src/{public,templates} $data
wrapProgram $bin/bin/gogs \ wrapProgram $out/bin/gogs \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]} --prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
''; '';

View File

@ -14,7 +14,7 @@ buildGoPackage rec {
}; };
goPackagePath = "github.com/containerd/containerd"; goPackagePath = "github.com/containerd/containerd";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man utillinux ]; nativeBuildInputs = [ go-md2man utillinux ];
@ -33,7 +33,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
for b in bin/*; do for b in bin/*; do
install -Dm555 $b $bin/$b install -Dm555 $b $out/$b
done done
make man make man

View File

@ -30,7 +30,6 @@ buildGoPackage rec {
sha256 = "142flmv54pj48rjqkd26fbxrcbx2cv6pdmrc33jgyvn6r99zliah"; sha256 = "142flmv54pj48rjqkd26fbxrcbx2cv6pdmrc33jgyvn6r99zliah";
}; };
outputs = [ "bin" "out" ];
nativeBuildInputs = [ git pkgconfig which ]; nativeBuildInputs = [ git pkgconfig which ];
buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror
libseccomp libselinux lvm2 ] libseccomp libselinux lvm2 ]
@ -43,9 +42,9 @@ buildGoPackage rec {
make binaries BUILDTAGS="$BUILDTAGS" make binaries BUILDTAGS="$BUILDTAGS"
''; '';
installPhase = '' installPhase = ''
install -Dm755 bin/crio $bin/bin/crio${flavor} install -Dm755 bin/crio $out/bin/crio${flavor}
install -Dm755 bin/crio-status $bin/bin/crio-status${flavor} install -Dm755 bin/crio-status $out/bin/crio-status${flavor}
install -Dm755 bin/pinns $bin/bin/pinns${flavor} install -Dm755 bin/pinns $out/bin/pinns${flavor}
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -33,7 +33,7 @@ buildGoPackage rec {
# docker-slim tries to create its state dir next to the binary (inside the nix # 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 # store), so we set it to use the working directory at the time of invocation
postInstall = '' 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; { meta = with stdenv.lib; {

View File

@ -16,7 +16,7 @@ buildGoPackage rec {
goDeps = null; goDeps = null;
installPhase = '' 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; { meta = with stdenv.lib; {

View File

@ -25,7 +25,7 @@ buildGoPackage rec {
goPackagePath = "github.com/containers/libpod"; goPackagePath = "github.com/containers/libpod";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ pkg-config go-md2man installShellFiles ]; nativeBuildInputs = [ pkg-config go-md2man installShellFiles ];
@ -40,7 +40,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm555 bin/podman $bin/bin/podman install -Dm555 bin/podman $out/bin/podman
installShellCompletion --bash completions/bash/podman installShellCompletion --bash completions/bash/podman
installShellCompletion --zsh completions/zsh/_podman installShellCompletion --zsh completions/zsh/_podman
MANDIR=$man/share/man make install.man MANDIR=$man/share/man make install.man

View File

@ -22,7 +22,7 @@ buildGoPackage rec {
}; };
goPackagePath = "github.com/opencontainers/runc"; goPackagePath = "github.com/opencontainers/runc";
outputs = [ "bin" "out" "man" ]; outputs = [ "out" "man" ];
nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ]; nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ];
buildInputs = [ libseccomp libapparmor apparmor-parser ]; buildInputs = [ libseccomp libapparmor apparmor-parser ];
@ -38,7 +38,7 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
install -Dm755 runc $bin/bin/runc install -Dm755 runc $out/bin/runc
installManPage man/*/* installManPage man/*/*
''; '';

View File

@ -42,7 +42,7 @@ buildGoPackage rec {
patchShebangs . patchShebangs .
sed -i 's|defaultPath := "[^"]*"|defaultPath := "${stdenv.lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go 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 # Don't install SUID binaries
sed -i 's/-m 4755/-m 755/g' builddir/Makefile sed -i 's/-m 4755/-m 755/g' builddir/Makefile
@ -54,16 +54,16 @@ buildGoPackage rec {
''; '';
installPhase = '' installPhase = ''
make -C builddir install LOCALSTATEDIR=$bin/var make -C builddir install LOCALSTATEDIR=$out/var
chmod 755 $bin/libexec/singularity/bin/starter-suid chmod 755 $out/libexec/singularity/bin/starter-suid
wrapProgram $bin/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs} wrapProgram $out/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs}
''; '';
postFixup = '' 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 # 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; { meta = with stdenv.lib; {

View File

@ -85,7 +85,7 @@ stdenv.mkDerivation {
inherit targetPrefix infixSalt; inherit targetPrefix infixSalt;
outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ]; outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info");
passthru = { passthru = {
inherit bintools libc nativeTools nativeLibc nativePrefix; 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 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 ## Man page and info support
## ##
ln -s ${bintools.man} $man ln -s ${bintools.man} $man
'' + optionalString (bintools ? info) ''
ln -s ${bintools.info} $info ln -s ${bintools.info} $info
'' '')
+ '' + ''
## ##

View File

@ -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";
};
}

View File

@ -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";
};
}

View File

@ -1,11 +1,11 @@
{ stdenv, fetchzip }: { stdenv, fetchzip }:
let let
version = "20190731"; version = "20200407";
in fetchzip { in fetchzip {
name = "iana-etc-${version}"; name = "iana-etc-${version}";
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz"; url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "0vqr4zm53zn7z75ynmf59xfrlhpyk8f41xd6i4v8j0f7k6hfdvpi"; sha256 = "1zmqim0l4lz5xbq7w2wi48fzsvg2msyw6c80dzw4vxll31frpy18";
postFetch = '' postFetch = ''
tar -xzvf $downloadedFile --strip-components=1 tar -xzvf $downloadedFile --strip-components=1

View File

@ -37,8 +37,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
deepin-gettext-tools # build deepin-gettext-tools # build
@ -109,7 +107,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath} make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath}
mv $out/share/gocode $out/share/go 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 = '' postFixup = ''

View File

@ -29,8 +29,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
dbus-factory dbus-factory

View File

@ -22,8 +22,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
outputs = [ "out" ];
nativeBuildInputs = [ nativeBuildInputs = [
pkgconfig pkgconfig
dbus-factory dbus-factory
@ -114,7 +112,7 @@ buildGoPackage rec {
installPhase = '' installPhase = ''
make install PREFIX="$out" -C go/src/${goPackagePath} make install PREFIX="$out" -C go/src/${goPackagePath}
rm -rf $out/share/lightdm # this is uselesss for NixOS 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 = '' postFixup = ''

View File

@ -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 # 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 # 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. # 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 \ substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) '' '' + stdenv.lib.optionalString (useLLVM) ''

View File

@ -159,6 +159,7 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true; enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -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 # 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 # 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. # 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 \ substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) '' '' + stdenv.lib.optionalString (useLLVM) ''

View File

@ -147,6 +147,7 @@ stdenv.mkDerivation ({
enableParallelBuilding = true; enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -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 # 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 # 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. # 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 \ substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) '' '' + stdenv.lib.optionalString (useLLVM) ''

View File

@ -168,6 +168,7 @@ in stdenv.mkDerivation ({
enableParallelBuilding = true; enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -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 # 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 # 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. # 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 \ substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) '' '' + stdenv.lib.optionalString (useLLVM) ''

View File

@ -143,6 +143,7 @@ in stdenv.mkDerivation ({
enableParallelBuilding = true; enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -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 # 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 # 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. # 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 \ substituteInPlace cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
'' + stdenv.lib.optionalString (useLLVM) '' '' + stdenv.lib.optionalString (useLLVM) ''

View File

@ -160,6 +160,7 @@ in stdenv.mkDerivation (rec {
enableParallelBuilding = true; enableParallelBuilding = true;
requiredSystemFeatures = [ "big-parallel" ];
meta = { meta = {
description = "Collection of modular and reusable compiler and toolchain technologies"; description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -203,15 +203,15 @@ let
installPhase = args.installPhase or '' installPhase = args.installPhase or ''
runHook preInstall runHook preInstall
mkdir -p $bin mkdir -p $out
dir="$NIX_BUILD_TOP/go/bin" dir="$NIX_BUILD_TOP/go/bin"
[ -e "$dir" ] && cp -r $dir $bin [ -e "$dir" ] && cp -r $dir $out
runHook postInstall runHook postInstall
''; '';
preFixup = preFixup + '' preFixup = preFixup + ''
find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
''; '';
strictDeps = true; strictDeps = true;
@ -235,9 +235,6 @@ let
enableParallelBuilding = enableParallelBuilding; enableParallelBuilding = enableParallelBuilding;
# I prefer to call this dev but propagatedBuildInputs expects $out to exist
outputs = args.outputs or [ "bin" "out" ];
meta = { meta = {
# Add default meta information # Add default meta information
homepage = "https://${goPackagePath}"; homepage = "https://${goPackagePath}";

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "c-blosc"; pname = "c-blosc";
version = "1.17.1"; version = "1.18.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Blosc"; owner = "Blosc";
repo = "c-blosc"; repo = "c-blosc";
rev = "v${version}"; rev = "v${version}";
sha256 = "1asp3xmbvdnz1mj1pl1ykzz61cybvkxz3cdn43zh1z0x1qlgwm80"; sha256 = "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70";
}; };
buildInputs = [ cmake ]; buildInputs = [ cmake ];

View File

@ -4,11 +4,11 @@
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "glew-2.1.0"; name = "glew-2.2.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/glew/${name}.tgz"; url = "mirror://sourceforge/glew/${name}.tgz";
sha256 = "159wk5dc0ykjbxvag5i1m2mhp23zkk6ra04l26y3jc3nwvkr3ph4"; sha256 = "1qak8f7g1iswgswrgkzc7idk7jmqgwrs58fhg2ai007v7j4q5z6l";
}; };
outputs = [ "bin" "out" "dev" "doc" ]; outputs = [ "bin" "out" "dev" "doc" ];

View File

@ -18,7 +18,14 @@ giDiscoverSelf() {
fi 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() { _multioutMoveGlibGir() {
moveToOutput share/gir-1.0 "${!outputDev}" moveToOutput share/gir-1.0 "${!outputDev}"

View File

@ -48,7 +48,7 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gtk+3"; pname = "gtk+3";
version = "3.24.18"; version = "3.24.20";
outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc"; outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc";
outputBin = "dev"; outputBin = "dev";
@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz"; url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz";
sha256 = "1lia2ybd1661j6mvrc00iyd50gm7sy157bdzlyf4mr028rzzzspm"; sha256 = "Laxp9xbo0EunqVCRWJ4rquyV3KzpMssVg5Fj20ebHfM=";
}; };
patches = [ patches = [
@ -71,12 +71,17 @@ stdenv.mkDerivation rec {
sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p"; sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p";
}) })
# https://gitlab.gnome.org/GNOME/gtk/merge_requests/1002 # Fix path handling in pkg-config
./patches/01-build-Fix-path-handling-in-pkgconfig.patch # 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 [ ] ++ optionals stdenv.isDarwin [
# X11 module requires <gio/gdesktopappinfo.h> which is not installed on Darwin # 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 # 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 # 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 ./patches/3.0-darwin-x11.patch
]; ];
@ -92,6 +97,11 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS";
postPatch = '' 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=( files=(
build-aux/meson/post-install.py build-aux/meson/post-install.py
demos/gtk-demo/geninclude.py demos/gtk-demo/geninclude.py

View File

@ -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

View File

@ -1,9 +1,13 @@
{ stdenv, lib, buildPackages, automake, autoconf, libtool, which, { stdenv
fetchpatch, openexr }: , buildPackages
, cmake
, libtool
, openexr
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ilmbase"; 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 project no longer provides separate tarballs. We may even want to merge
# the ilmbase package into openexr in the future. # the ilmbase package into openexr in the future.
@ -13,19 +17,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
preConfigure = '' nativeBuildInputs = [ cmake libtool ];
patchShebangs ./bootstrap
./bootstrap
'';
depsBuildBuild = [ buildPackages.stdenv.cc ]; 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 # fails 1 out of 1 tests with
# "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed" # "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed"

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ];
NIX_CFLAGS_COMPILE = "-fno-lto"; NIX_CFLAGS_COMPILE = "-fno-lto";
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -22,6 +22,14 @@ stdenv.mkDerivation rec {
buildInputs = [ hidapi libcbor openssl ] buildInputs = [ hidapi libcbor openssl ]
++ stdenv.lib.optionals stdenv.isLinux [ udev ]; ++ stdenv.lib.optionals stdenv.isLinux [ udev ];
patches = [
# make build reproducible
(fetchpatch {
url = "https://github.com/Yubico/libfido2/commit/e79f7d7996e70d6b2ae9826fce81d61659cab4f6.patch";
sha256 = "0jwg69f95qqf0ym24q1ka50d3d3338cyw4fdfzpw4sab0shiaq9v";
})
];
cmakeFlags = [ cmakeFlags = [
"-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d" "-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d"
"-DUSE_HIDAPI=1" "-DUSE_HIDAPI=1"

View File

@ -2,34 +2,18 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libglvnd"; pname = "libglvnd";
version = "1.2.0"; version = "1.3.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "NVIDIA"; owner = "NVIDIA";
repo = "libglvnd"; repo = "libglvnd";
rev = "v${version}"; rev = "v${version}";
sha256 = "1hyywwjsmvsd7di603f7iznjlccqlc7yvz0j59gax7bljm9wb6ni"; sha256 = "0mkzdzdxjxjl794rblq4mq33wmb8ikqmfswbqdbr8gw2kw4wlhdl";
}; };
nativeBuildInputs = [ autoreconfHook pkgconfig python3 addOpenGLRunpath ]; nativeBuildInputs = [ autoreconfHook pkgconfig python3 addOpenGLRunpath ];
buildInputs = [ libX11 libXext xorgproto ]; 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 '' postPatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace src/GLX/Makefile.am \ substituteInPlace src/GLX/Makefile.am \
--replace "-Wl,-Bsymbolic " "" --replace "-Wl,-Bsymbolic " ""

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libssh"; pname = "libssh";
version = "0.8.8"; version = "0.8.9";
src = fetchurl { src = fetchurl {
url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz"; url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz";
sha256 = "1qk5bm9r6199jbfk54f8w24vkl52051g8s3kmq4z2kdc6vbpy4jb"; sha256 = "09b8w9m5qiap8wbvz4613nglsynpk8hn0q9b929ny2y4l2fy2nc5";
}; };
postPatch = '' postPatch = ''

View File

@ -12,12 +12,12 @@ stdenv.mkDerivation rec {
patches = [ patches = [
(fetchpatch { (fetchpatch {
url = "https://gitlab.xiph.org/xiph/vorbis/uploads/a68cf70fa10c8081a633f77b5c6576b7/0001-CVE-2017-14160-make-sure-we-don-t-overflow.patch"; url = "https://gitlab.xiph.org/xiph/vorbis/commit/018ca26dece618457dd13585cad52941193c4a25.patch";
sha256 = "0v21p59cb3z77ch1v6q5dcrd733h91f3m8ifnd7kkkr8gzn17d5x"; sha256 = "18k4vp0nmrxxpis641ylnw6dgwxrymh5bf74njr6v8dizmmz1bkj";
name = "CVE-2017-14160+CVE-2018-10393.patch"; name = "CVE-2017-14160+CVE-2018-10393.patch";
}) })
(fetchpatch { (fetchpatch {
url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaa.diff"; url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaacad51305e1464d4b381dabad0e88b.diff";
sha256 = "1k77y3q36npy8mkkz40f6cb46l2ldrwyrd191m29s8rnbhnafdf7"; sha256 = "1k77y3q36npy8mkkz40f6cb46l2ldrwyrd191m29s8rnbhnafdf7";
name = "CVE-2018-10392.patch"; name = "CVE-2018-10392.patch";
}) })

View File

@ -1,10 +1,10 @@
{ callPackage, fetchurl, ... } @ args: { callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec { callPackage ./generic.nix (args // rec {
version = "3.5.1"; version = "3.6";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/nettle/nettle-${version}.tar.gz"; url = "mirror://gnu/nettle/nettle-${version}.tar.gz";
sha256 = "06clvkdfxhlbagn4afssylmn5vrak59dlmnvy8b2xc31hycs3k3m"; sha256 = "1wg3sprl0bzy49cmbwwm91vw67hk1x5i3ksdygsciyxz587hsk6j";
}; };
}) })

View File

@ -38,20 +38,20 @@
assert blas.implementation == "openblas" && lapack.implementation == "openblas"; assert blas.implementation == "openblas" && lapack.implementation == "openblas";
let let
version = "4.1.2"; version = "4.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv"; repo = "opencv";
rev = version; rev = version;
sha256 = "0c98ziwvfrzdzwn52a36d37n5rac8zmxq2jn479bzfaii1bib8xx"; sha256 = "1r9bq9p1x99g2y8jvj9428sgqvljz75dm5vrfsma7hh5wjhz9775";
}; };
contribSrc = fetchFromGitHub { contribSrc = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv_contrib"; repo = "opencv_contrib";
rev = version; rev = version;
sha256 = "10ryyxhggin5dk5glf4ycyrfryqf50f4bs10biv6nxlrrinm2di4"; sha256 = "068b4f95rlryab3mffxs2w6dnbmbhrnpsdgl007rxk4bwnz29y49";
}; };
# Contrib must be built in order to enable Tesseract support: # Contrib must be built in order to enable Tesseract support:
@ -62,8 +62,8 @@ let
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv_3rdparty"; repo = "opencv_3rdparty";
rev = "32e315a5b106a7b89dbed51c28f8120a48b368b4"; rev = "a56b6ac6f030c312b2dce17430eef13aed9af274";
sha256 = "19w9f0r16072s59diqxsr5q6nmwyz9gnxjs49nglzhd66p3ddbkp"; sha256 = "1msbkc3zixx61rcg6a04i1bcfhw1phgsrh93glq1n80hgsk3nbjq";
} + "/ippicv"; } + "/ippicv";
files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in
if stdenv.hostPlatform.system == "x86_64-linux" then 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 # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
# what appears to be some stray headers in dnn/misc/tensorflow # what appears to be some stray headers in dnn/misc/tensorflow
# in contrib when generating the Python bindings: # 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 = '' postPatch = ''
sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt 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 sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py

View File

@ -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

View File

@ -1,11 +1,13 @@
{ lib, stdenv, buildPackages, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, { lib
zlib, ilmbase, fetchpatch }: , stdenv
, buildPackages
let , fetchFromGitHub
# Doesn't really do anything when not crosscompiling , zlib
emulator = stdenv.hostPlatform.emulator buildPackages; , ilmbase
in , fetchpatch
, cmake
, libtool
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "openexr"; pname = "openexr";
version = "2.4.1"; version = "2.4.1";
@ -17,36 +19,11 @@ stdenv.mkDerivation rec {
sha256 = "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01"; sha256 = "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01";
}; };
sourceRoot = "source/OpenEXR";
outputs = [ "bin" "dev" "out" "doc" ]; outputs = [ "bin" "dev" "out" "doc" ];
nativeBuildInputs = [ cmake libtool ];
# 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
'';
nativeBuildInputs = [ pkgconfig autoconf automake libtool ];
propagatedBuildInputs = [ ilmbase zlib ]; propagatedBuildInputs = [ ilmbase zlib ];
enableParallelBuilding = true; enableParallelBuilding = true;
doCheck = false; # fails 1 of 1 tests
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A high dynamic-range (HDR) image file format"; description = "A high dynamic-range (HDR) image file format";

View File

@ -96,12 +96,12 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "openblas"; pname = "openblas";
version = "0.3.8"; version = "0.3.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xianyi"; owner = "xianyi";
repo = "OpenBLAS"; repo = "OpenBLAS";
rev = "v${version}"; rev = "v${version}";
sha256 = "0s017qqi4n6jzrxl9cyx625wj26smnyn5g8s699s7h8v1srlrw6p"; sha256 = "0nq51j45shb32n6086xff3x374kx5qhr2cwjzvppx4s2z0ahflal";
}; };
inherit blas64; inherit blas64;

View File

@ -5,13 +5,17 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "certifi"; pname = "certifi";
version = "2019.11.28"; version = "2020.4.5.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"; sha256 = "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i";
}; };
pythonImportsCheck = [ "certifi" ];
dontUseSetuptoolsCheck = true;
meta = { meta = {
homepage = "https://certifi.io/"; homepage = "https://certifi.io/";
description = "Python package for providing Mozilla's CA Bundle"; description = "Python package for providing Mozilla's CA Bundle";

View File

@ -3,7 +3,7 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, fsspec , fsspec
, pytest , pytestCheckHook
, pythonOlder , pythonOlder
, cloudpickle , cloudpickle
, numpy , numpy
@ -15,7 +15,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "dask"; pname = "dask";
version = "2.10.1"; version = "2.14.0";
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.5";
@ -23,13 +23,15 @@ buildPythonPackage rec {
owner = "dask"; owner = "dask";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "035mr7385yf5ng5wf60qxr80529h8dsla5hymkyg68dxhkd0jvbr"; sha256 = "0kj46pwzvdw8ii1h45y48wxvjid89yp4cfak2h4b8z8xic73fqgj";
}; };
checkInputs = [ checkInputs = [
pytest pytestCheckHook
]; ];
dontUseSetuptoolsCheck = true;
propagatedBuildInputs = [ propagatedBuildInputs = [
bokeh bokeh
cloudpickle cloudpickle
@ -50,9 +52,10 @@ buildPythonPackage rec {
--replace "cmdclass=versioneer.get_cmdclass()," "" --replace "cmdclass=versioneer.get_cmdclass()," ""
''; '';
checkPhase = '' disabledTests = [
pytest "test_argwhere_str"
''; "test_count_nonzero_str"
];
meta = { meta = {
description = "Minimal task scheduling abstraction"; description = "Minimal task scheduling abstraction";

View File

@ -22,12 +22,12 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "ipython"; pname = "ipython";
version = "7.12.0"; version = "7.13.0";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "d9459e7237e2e5858738ff9c3e26504b79899b58a6d49e574d352493d80684c6"; sha256 = "ca478e52ae1f88da0102360e57e528b92f3ae4316aabac80a2cd7f7ab2efb48a";
}; };
prePatch = lib.optionalString stdenv.isDarwin '' prePatch = lib.optionalString stdenv.isDarwin ''

View File

@ -12,11 +12,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "jupyter_client"; pname = "jupyter_client";
version = "5.3.4"; version = "6.1.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "60e6faec1031d63df57f1cc671ed673dced0ed420f4377ea33db37b1c188b910"; sha256 = "3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -11,11 +11,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "jupyter_core"; pname = "jupyter_core";
version = "4.6.1"; version = "4.6.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244"; sha256 = "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e";
}; };
checkInputs = [ pytest mock glibcLocales nose ]; checkInputs = [ pytest mock glibcLocales nose ];

View File

@ -9,11 +9,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "line_profiler"; pname = "line_profiler";
version = "2.1.2"; version = "3.0.2";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c"; sha256 = "7218ad6bd81f8649b211974bf108933910f016d66b49651effe7bbf63667d141";
}; };
patches = [ ./python37.patch ]; patches = [ ./python37.patch ];

View File

@ -12,11 +12,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "nbformat"; pname = "nbformat";
version = "4.4.0"; version = "5.0.4";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "f7494ef0df60766b7cabe0a3651556345a963b74dbc16bc7c18479041170d402"; sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a";
}; };
LC_ALL="en_US.utf8"; LC_ALL="en_US.utf8";

View File

@ -12,11 +12,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "nbformat"; pname = "nbformat";
version = "5.0.4"; version = "5.0.6";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a"; sha256 = "049af048ed76b95c3c44043620c17e56bc001329e07f83fec4f177f0e3d7b757";
}; };
LC_ALL="en_US.utf8"; LC_ALL="en_US.utf8";

View File

@ -25,11 +25,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "notebook"; pname = "notebook";
version = "5.7.8"; version = "6.0.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "573e0ae650c5d76b18b6e564ba6d21bf321d00847de1d215b418acb64f056eb8"; sha256 = "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48";
}; };
LC_ALL = "en_US.utf8"; LC_ALL = "en_US.utf8";

View File

@ -27,13 +27,13 @@ let
}; };
in buildPythonPackage rec { in buildPythonPackage rec {
pname = "numpy"; pname = "numpy";
version = "1.18.1"; version = "1.18.3";
format = "pyproject.toml"; format = "pyproject.toml";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
extension = "zip"; extension = "zip";
sha256 = "b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77"; sha256 = "e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8";
}; };
nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ]; nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ];

View File

@ -14,11 +14,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "qtconsole"; pname = "qtconsole";
version = "4.6.0"; version = "4.7.3";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "654f423662e7dfe6a9b26fac8ec76aedcf742c339909ac49f1f0c1a1b744bcd1"; sha256 = "8f5ae5571f0e921db9f2d12613ed667c350ee22c7db598d9bbbe143e8533f932";
}; };
checkInputs = [ nose ] ++ lib.optionals isPy27 [mock]; checkInputs = [ nose ] ++ lib.optionals isPy27 [mock];

View File

@ -13,11 +13,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "reikna"; pname = "reikna";
version = "0.7.4"; version = "0.7.5";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "52bbce24fa1fd7bb950d38ce9b60f497dd00ac6b26688d80ab9bce709f063e71"; sha256 = "d01f4264c8379ef2962a93aacb002d491b92ef9b5b22b45f77e7821dfa87bef7";
}; };
checkInputs = [ sphinx pytestcov pytest ]; checkInputs = [ sphinx pytestcov pytest ];

View File

@ -9,11 +9,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "sounddevice"; pname = "sounddevice";
version = "0.3.14"; version = "0.3.15";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "c7b0f7ad86550668da55404eabcb63d4212ec622fcce86510092306b77d2e80a"; sha256 = "028f6e5df83027f4bfba5d6d61e6d46eb8689f9e647825e09f539920dee17d2c";
}; };
propagatedBuildInputs = [ cffi numpy portaudio ]; propagatedBuildInputs = [ cffi numpy portaudio ];

View File

@ -13,11 +13,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "statsmodels"; pname = "statsmodels";
version = "0.11.0"; version = "0.11.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "0wcc7xbwlf8r2diw9fnzf4bg9h5cg406w7phd3dz37hx17yfi3ha"; sha256 = "5bde3fa0a35a91b45dba7cbc28270b5b649ff1d721c89290883f6e831672d5f0";
}; };
checkInputs = with self; [ nose ]; checkInputs = with self; [ nose ];

View File

@ -5,12 +5,12 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
version = "0.8.6"; version = "0.8.7";
pname = "tabulate"; pname = "tabulate";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8"; sha256 = "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007";
}; };
checkInputs = [ nose ]; checkInputs = [ nose ];

View File

@ -9,11 +9,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "tqdm"; pname = "tqdm";
version = "4.42.1"; version = "4.45.0";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "251ee8440dbda126b8dfa8a7c028eb3f13704898caaef7caa699b35e119301e2"; sha256 = "00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81";
}; };
checkInputs = [ nose coverage glibcLocales flake8 ]; checkInputs = [ nose coverage glibcLocales flake8 ];

View File

@ -10,11 +10,11 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "xarray"; pname = "xarray";
version = "0.15.0"; version = "0.15.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "c72d160c970725201f769e80fb91cbad68d6ebf21d68fcc371385a6c950459c3"; sha256 = "64e3138d87b641e22fe7a003c94abc685896b247b63e434505c1e6b38c91a8fb";
}; };
checkInputs = [ pytest ]; checkInputs = [ pytest ];

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