Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-01-27 12:01:56 +00:00 committed by GitHub
commit e11b11e738
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
201 changed files with 2352 additions and 1429 deletions

View file

@ -719,10 +719,10 @@
}]; }];
}; };
alyaeanyx = { alyaeanyx = {
email = "alexandra.hollmeier@mailbox.org"; email = "alyaeanyx@mailbox.org";
github = "alyaeanyx"; github = "alyaeanyx";
githubId = 74795488; githubId = 74795488;
name = "Alexandra Hollmeier"; name = "alyaeanyx";
keys = [{ keys = [{
fingerprint = "1F73 8879 5E5A 3DFC E2B3 FA32 87D1 AADC D25B 8DEE"; fingerprint = "1F73 8879 5E5A 3DFC E2B3 FA32 87D1 AADC D25B 8DEE";
}]; }];
@ -7555,6 +7555,12 @@
githubId = 44045911; githubId = 44045911;
name = "Kid"; name = "Kid";
}; };
kidsan = {
email = "8798449+Kidsan@users.noreply.github.com";
github = "kidsan";
githubId = 8798449;
name = "kidsan";
};
kierdavis = { kierdavis = {
email = "kierdavis@gmail.com"; email = "kierdavis@gmail.com";
github = "kierdavis"; github = "kierdavis";
@ -14224,6 +14230,12 @@
githubId = 3268082; githubId = 3268082;
name = "Thibaut Marty"; name = "Thibaut Marty";
}; };
thled = {
name = "Thomas Le Duc";
email = "dev@tleduc.de";
github = "thled";
githubId = 28220902;
};
thyol = { thyol = {
name = "thyol"; name = "thyol";
email = "thyol@pm.me"; email = "thyol@pm.me";

View file

@ -121,6 +121,16 @@ in {
List of plugins to be disabled. List of plugins to be disabled.
''; '';
}; };
EspLocation = mkOption {
type = types.path;
default = config.boot.loader.efi.efiSysMountPoint;
defaultText = lib.literalExpression "config.boot.loader.efi.efiSysMountPoint";
description = lib.mdDoc ''
The EFI system partition (ESP) path used if UDisks is not available
or if this partition is not mounted at /boot/efi, /boot, or /efi
'';
};
}; };
}; };
default = {}; default = {};

View file

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ladspa-sdk"; pname = "ladspa-sdk";
version = "1.15"; version = "1.15";
@ -7,12 +8,27 @@ stdenv.mkDerivation rec {
sha256 = "1vgx54cgsnc3ncl9qbgjbmq12c444xjafjkgr348h36j16draaa2"; sha256 = "1vgx54cgsnc3ncl9qbgjbmq12c444xjafjkgr348h36j16draaa2";
}; };
sourceRoot = "ladspa_sdk_${version}/src";
strictDeps = true;
patchPhase = '' patchPhase = ''
cd src
sed -i 's@/usr/@$(out)/@g' Makefile sed -i 's@/usr/@$(out)/@g' Makefile
sed -i 's@-mkdirhier@mkdir -p@g' Makefile
''; '';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CPP=${stdenv.cc.targetPrefix}c++"
];
# The default target also runs tests, which we don't want to do in
# the build phase as it would break cross.
buildFlags = [ "targets" ];
# Tests try to create and play a sound file. Playing will fail, but
# it's probably still useful to run the part that creates the file.
doCheck = true;
meta = { meta = {
description = "The SDK for the LADSPA audio plugin standard"; description = "The SDK for the LADSPA audio plugin standard";
longDescription = '' longDescription = ''

View file

@ -34,11 +34,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "bisq-desktop"; pname = "bisq-desktop";
version = "1.9.8"; version = "1.9.9";
src = fetchurl { src = fetchurl {
url = "https://github.com/bisq-network/bisq/releases/download/v${version}/Bisq-64bit-${version}.deb"; url = "https://github.com/bisq-network/bisq/releases/download/v${version}/Bisq-64bit-${version}.deb";
sha256 = "1hwfchwqvflfzpv8n9wvj567a68fa4bch0hi8vk4pzmwxsx4z7g1"; sha256 = "0jisxzajsc4wfvxabvfzd0x9y1fxzg39fkhap1781q7wyi4ry9kd";
}; };
nativeBuildInputs = [ makeWrapper copyDesktopItems imagemagick dpkg zip xz ]; nativeBuildInputs = [ makeWrapper copyDesktopItems imagemagick dpkg zip xz ];

View file

@ -7,14 +7,13 @@ version="$(curl -s https://api.github.com/repos/bisq-network/bisq/releases| jq '
depname="Bisq-64bit-$version.deb" depname="Bisq-64bit-$version.deb"
src="https://github.com/bisq-network/bisq/releases/download/v$version/$depname" src="https://github.com/bisq-network/bisq/releases/download/v$version/$depname"
signature="$src.asc" signature="$src.asc"
key="CB36 D7D2 EBB2 E35D 9B75 500B CD5D C1C5 29CD FD3B"
pushd $(mktemp -d --suffix=-bisq-updater) pushd $(mktemp -d --suffix=-bisq-updater)
export GNUPGHOME=$PWD/gnupg export GNUPGHOME=$PWD/gnupg
mkdir -m 700 -p "$GNUPGHOME" mkdir -m 700 -p "$GNUPGHOME"
curl -L -o "$depname" -- "$src" curl -L -o "$depname" -- "$src"
curl -L -o signature.asc -- "$signature" curl -L -o signature.asc -- "$signature"
gpg --batch --recv-keys "$key" curl https://bisq.network/pubkey/E222AA02.asc | gpg --import
gpg --batch --verify signature.asc "$depname" gpg --batch --verify signature.asc "$depname"
sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$depname") sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$depname")
popd popd

View file

@ -19,13 +19,14 @@ let
dontPatchELF ? true, dontPatchELF ? true,
dontStrip ? true, dontStrip ? true,
nativeBuildInputs ? [], nativeBuildInputs ? [],
passthru ? { },
... ...
}: }:
stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // { stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // {
name = "vscode-extension-${name}"; name = "vscode-extension-${name}";
passthru = { passthru = passthru // {
inherit vscodeExtPublisher vscodeExtName vscodeExtUniqueId; inherit vscodeExtPublisher vscodeExtName vscodeExtUniqueId;
}; };

View file

@ -0,0 +1,33 @@
{ lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, alsa-lib
}:
rustPlatform.buildRustPackage rec {
pname = "kord";
version = "0.4.2";
# kord depends on nightly features
RUSTC_BOOTSTRAP = 1;
src = fetchFromGitHub {
owner = "twitchax";
repo = "kord";
rev = "v${version}";
sha256 = "sha256-B/UwnbzXI3ER8IMOVtn0ErVqFrkZXKoL+l7ll1AlzDg=";
};
cargoHash = "sha256-xhWSycTe72HW3E9meTo4wjOCHDcNq6fUPT6nqHoW9vE=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib ];
meta = with lib; {
description = "A music theory binary and library for Rust";
homepage = "https://github.com/twitchax/kord";
maintainers = with maintainers; [ kidsan ];
license = with licenses; [ mit ];
};
}

View file

@ -1,12 +1,12 @@
{ appimageTools, lib, fetchurl }: { appimageTools, lib, fetchurl }:
let let
pname = "neo4j-desktop"; pname = "neo4j-desktop";
version = "1.4.12"; version = "1.5.6";
name = "${pname}-${version}"; name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/dist.neo4j.org/${pname}/linux-offline/${name}-x86_64.AppImage"; url = "https://s3-eu-west-1.amazonaws.com/dist.neo4j.org/${pname}/linux-offline/${name}-x86_64.AppImage";
hash = "sha256-CfdXus9Zj6Tx6wAXpV2tRdqvJqowgE+NIL04v3fwtJE="; hash = "sha256-0/jS1LaaIam6w7RbLXSKXiXlpocZMTMuTZvFRU4qypg=";
}; };
appimageContents = appimageTools.extract { inherit name src; }; appimageContents = appimageTools.extract { inherit name src; };

View file

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "nwg-bar"; pname = "nwg-bar";
version = "unstable-2021-09-23"; version = "0.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nwg-piotr"; owner = "nwg-piotr";
repo = pname; repo = pname;
rev = "7dd7df3cd9a9e78fe477e88e0f3cb97309d50ff5"; rev = "v${version}";
sha256 = "sha256-piysF19WDjb/EGI9MBepYrOrQL9C1fsoq05AP8CYN58="; sha256 = "sha256-3uDEmIrfvUD/QGwgFYYWQUeYq35XJdpSVL9nHBl11kY=";
}; };
patches = [ ./fix-paths.patch ]; patches = [ ./fix-paths.patch ];

View file

@ -2,11 +2,11 @@
appimageTools.wrapType2 rec { appimageTools.wrapType2 rec {
pname = "remnote"; pname = "remnote";
version = "1.7.6"; version = "1.8.52";
src = fetchurl { src = fetchurl {
url = "https://download.remnote.io/RemNote-${version}.AppImage"; url = "https://download.remnote.io/RemNote-${version}.AppImage";
sha256 = "sha256-yRUpLev/Fr3mOamkFgevArv2UoXgV4e6zlyv7FaQ4RM="; sha256 = "sha256-0t4i/4dlZ1tv4kz8eD5cjIuhx0lT8dQbh+bpjqAfqTE=";
}; };
meta = with lib; { meta = with lib; {

View file

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "tut"; pname = "tut";
version = "2.0.0"; version = "2.0.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "RasmusLindroth"; owner = "RasmusLindroth";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-Oypl80UsYRRSIMvHDPSS6rrvzjlxZ/UKDNDGc2Yan+w="; sha256 = "sha256-AtwwLRZx9O8IWPFgFI/ZK0tbeshEmaKpTQxA1PepnWM=";
}; };
vendorHash = "sha256-qeYgkF9sIJ0slRarXbCHZ+1JmtZwXDnrJIpRKGOoW5Q="; vendorHash = "sha256-gPF4XrUqDDJCCY1zrUr3AXDG0uoADR8LBxRP4yolcug=";
meta = with lib; { meta = with lib; {
description = "A TUI for Mastodon with vim inspired keys"; description = "A TUI for Mastodon with vim inspired keys";

View file

@ -13,13 +13,13 @@ assert enablePython -> python != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "elinks"; pname = "elinks";
version = "0.15.1"; version = "0.16.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rkd77"; owner = "rkd77";
repo = "felinks"; repo = "felinks";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-9OEi4UF/4/IRtccJou3QuevQzWjA6PuU5IVlT7qqGZ0="; sha256 = "sha256-4+V1j78sjs3/6SnVLO34jCcNuegpZan8Ykd8Gy0vc3k=";
}; };
buildInputs = [ buildInputs = [
@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
"--enable-nntp" "--enable-nntp"
"--enable-256-colors" "--enable-256-colors"
"--enable-true-color" "--enable-true-color"
"--with-brotli"
"--with-lzma" "--with-lzma"
"--with-libev" "--with-libev"
"--with-terminfo" "--with-terminfo"

View file

@ -33,7 +33,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "calls"; pname = "calls";
version = "43.0"; version = "43.2";
src = fetchFromGitLab { src = fetchFromGitLab {
domain = "gitlab.gnome.org"; domain = "gitlab.gnome.org";
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
fetchSubmodules = true; fetchSubmodules = true;
hash = "sha256-fvG9N6HuuO8BMH8MJRquMSe1oEPNmX/pzsJX5yzs1CY="; hash = "sha256-gHlhbQGtdIjKLMAkTxfc2QOjvNUPGKKL+OK8/vm0Oac=";
}; };
outputs = [ "out" "devdoc" ]; outputs = [ "out" "devdoc" ];

View file

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "argocd"; pname = "argocd";
version = "2.5.7"; version = "2.5.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "argoproj"; owner = "argoproj";
repo = "argo-cd"; repo = "argo-cd";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-hEfPiDbEdmuD/IHM9Tfy0kUkKDpbTZ0HzMjIt/ifcPk="; sha256 = "sha256-4L0xj4+NLThSLzXTncUnUILOsV3qr9+f8osv19OW6oI=";
}; };
proxyVendor = true; # darwin/linux hash mismatch proxyVendor = true; # darwin/linux hash mismatch

View file

@ -1,55 +1,52 @@
{ lib { lib
, buildGoModule , buildGoModule
, fetchFromGitHub , fetchFromGitHub
, libkrb5 , gpgme
, git
, installShellFiles , installShellFiles
, testers , testers
, openshift , openshift
}: }:
buildGoModule rec { buildGoModule rec {
pname = "openshift"; pname = "openshift";
version = "4.11.0"; version = "4.12.0";
gitCommit = "20dd77d5"; gitCommit = "854f807";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "openshift"; owner = "openshift";
repo = "oc"; repo = "oc";
rev = "20dd77d5c889f86b05e2bdd182853ae702852c63"; rev = "854f807d8a84dde710c062a5281bca5bc07cb562";
sha256 = "wqLo/CKGzeMDJUoI9PUEjJER5hSPu+FmUCJLPZ9PJuw="; hash = "sha256-GH3LjAeMIHmFbJoKGoeeNteP4Ma2+kIC5rAxObdziKg=";
}; };
vendorSha256 = null; vendorHash = null;
buildInputs = [ libkrb5 ]; buildInputs = [ gpgme ];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
patchPhase = '' ldflags = [
patchShebangs ./hack "-s"
''; "-w"
"-X github.com/openshift/oc/pkg/version.commitFromGit=${gitCommit}"
"-X github.com/openshift/oc/pkg/version.versionFromGit=v${version}"
];
buildPhase = '' doCheck = false;
# Openshift build require this variables to be set
# unless there is a .git folder which is not the case with fetchFromGitHub
export SOURCE_GIT_COMMIT=${gitCommit}
export SOURCE_GIT_TAG=v${version}
export SOURCE_GIT_TREE_STATE=clean
make all
'';
installPhase = ''
mkdir -p $out/bin
cp oc $out/bin
postInstall = ''
# Install man pages.
mkdir -p man mkdir -p man
./genman man oc $out/bin/genman man oc
installManPage man/*.1 installManPage man/*.1
installShellCompletion --bash contrib/completions/bash/* # Remove unwanted tooling.
installShellCompletion --zsh contrib/completions/zsh/* rm $out/bin/clicheck $out/bin/gendocs $out/bin/genman
# Install shell completions.
installShellCompletion --cmd oc \
--bash <($out/bin/oc completion bash) \
--fish <($out/bin/oc completion fish) \
--zsh <($out/bin/oc completion zsh)
''; '';
passthru.tests.version = testers.testVersion { passthru.tests.version = testers.testVersion {

View file

@ -213,11 +213,11 @@
"vendorHash": null "vendorHash": null
}, },
"cloudamqp": { "cloudamqp": {
"hash": "sha256-S4iXhss4ASM4FJdBgElH/3IwpPFjUMy57BXG7C7p5+0=", "hash": "sha256-xua8ZJjc+y6bzF/I2N752Cv22XAXvOjrH9Du1TdipM0=",
"homepage": "https://registry.terraform.io/providers/cloudamqp/cloudamqp", "homepage": "https://registry.terraform.io/providers/cloudamqp/cloudamqp",
"owner": "cloudamqp", "owner": "cloudamqp",
"repo": "terraform-provider-cloudamqp", "repo": "terraform-provider-cloudamqp",
"rev": "v1.22.1", "rev": "v1.23.0",
"spdx": "MPL-2.0", "spdx": "MPL-2.0",
"vendorHash": "sha256-PALZGyGZ6Ggccl4V9gG+gsEdNipYG+DCaZkqF0W1IMQ=" "vendorHash": "sha256-PALZGyGZ6Ggccl4V9gG+gsEdNipYG+DCaZkqF0W1IMQ="
}, },
@ -743,13 +743,13 @@
"vendorHash": "sha256-w/1eNrXK4Zpt80J1FidnhMAD0lhSskHMt/hrdrgfSYw=" "vendorHash": "sha256-w/1eNrXK4Zpt80J1FidnhMAD0lhSskHMt/hrdrgfSYw="
}, },
"mongodbatlas": { "mongodbatlas": {
"hash": "sha256-jYEeJoMqYo5BCsr8pZlowwUPdW/QrCoHiSpDrEGK9QQ=", "hash": "sha256-OR9bvtg3DoJ4hFP/iqzQ1cFwWZYrUrzykN6sycd0Z6o=",
"homepage": "https://registry.terraform.io/providers/mongodb/mongodbatlas", "homepage": "https://registry.terraform.io/providers/mongodb/mongodbatlas",
"owner": "mongodb", "owner": "mongodb",
"repo": "terraform-provider-mongodbatlas", "repo": "terraform-provider-mongodbatlas",
"rev": "v1.7.0", "rev": "v1.8.0",
"spdx": "MPL-2.0", "spdx": "MPL-2.0",
"vendorHash": "sha256-9m+eukHaSdSstWBtjxpgYkgyQVXx0jmKfEz3D9YROO4=" "vendorHash": "sha256-cvTIFjKYrIohRjUTxGOxgla2t/elj3Aw79kbVdaQbrY="
}, },
"namecheap": { "namecheap": {
"hash": "sha256-cms8YUL+SjTeYyIOQibksi8ZHEBYq2JlgTEpOO1uMZE=", "hash": "sha256-cms8YUL+SjTeYyIOQibksi8ZHEBYq2JlgTEpOO1uMZE=",
@ -888,11 +888,11 @@
"vendorHash": null "vendorHash": null
}, },
"pagerduty": { "pagerduty": {
"hash": "sha256-0gEuIvgiFntP7dHmpkB3IRGMrAI8JbWG0zxiyNdFAiM=", "hash": "sha256-utbV/EVSYIln0ruf4qis9rbKifx/DUct3tDOTUO22N0=",
"homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty", "homepage": "https://registry.terraform.io/providers/PagerDuty/pagerduty",
"owner": "PagerDuty", "owner": "PagerDuty",
"repo": "terraform-provider-pagerduty", "repo": "terraform-provider-pagerduty",
"rev": "v2.9.2", "rev": "v2.9.3",
"spdx": "MPL-2.0", "spdx": "MPL-2.0",
"vendorHash": null "vendorHash": null
}, },
@ -1050,13 +1050,13 @@
"vendorHash": "sha256-NO1r/EWLgH1Gogru+qPeZ4sW7FuDENxzNnpLSKstnE8=" "vendorHash": "sha256-NO1r/EWLgH1Gogru+qPeZ4sW7FuDENxzNnpLSKstnE8="
}, },
"spotinst": { "spotinst": {
"hash": "sha256-2w4Qh9S0YxvcNdgtPLsNEumZiJn3+VH80zwamJW1FWQ=", "hash": "sha256-UivENbjPajJdH9PwHznMP+cLXBJ8C38wgHS2IqyoqRk=",
"homepage": "https://registry.terraform.io/providers/spotinst/spotinst", "homepage": "https://registry.terraform.io/providers/spotinst/spotinst",
"owner": "spotinst", "owner": "spotinst",
"repo": "terraform-provider-spotinst", "repo": "terraform-provider-spotinst",
"rev": "v1.96.0", "rev": "v1.97.0",
"spdx": "MPL-2.0", "spdx": "MPL-2.0",
"vendorHash": "sha256-SRQWZGyQDbESrpu0tsy6EBfvjY/l89fQexCdhSYPzGI=" "vendorHash": "sha256-iQLZpSa1gJ4z2/r1Om9vFrcKP5ik7kcx+rNVZLhmSBc="
}, },
"stackpath": { "stackpath": {
"hash": "sha256-nTR9HgSmuNCt7wxE4qqIH2+HA2igzqVx0lLRx6FoKrE=", "hash": "sha256-nTR9HgSmuNCt7wxE4qqIH2+HA2igzqVx0lLRx6FoKrE=",

View file

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "juju"; pname = "juju";
version = "2.9.35"; version = "2.9.38";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "juju"; owner = "juju";
repo = "juju"; repo = "juju";
rev = "juju-${version}"; rev = "juju-${version}";
sha256 = "sha256-tRuT4freMDtFjmZuBV9WD9jQFUat8QAias5d+AN7IVo="; sha256 = "sha256-QTO6MHiFx3nDXDaaVy7rCiR0ttBXt5oAw94/ZDTICOM=";
}; };
vendorSha256 = "sha256-2MevXSjjwXDjmiMhiZyv45a3OgDrliVcvHbXGRIOu1s="; vendorHash = "sha256-QOu1azw3OUWaz7MRFGZ5CGX4bVegbFYp76/XpesnaUM=";
# Disable tests because it attempts to use a mongodb instance # Disable tests because it attempts to use a mongodb instance
doCheck = false; doCheck = false;

View file

@ -11,16 +11,16 @@
buildGoModule rec { buildGoModule rec {
pname = "rymdport"; pname = "rymdport";
version = "3.2.0"; version = "3.3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Jacalz"; owner = "Jacalz";
repo = "rymdport"; repo = "rymdport";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-kAEkeRAS+gMjdriop4tQcqc+GldldxOn+QwgWTl8XB0="; hash = "sha256-IsUKZL1aOKH01yZ7e/ciAESQKdZSscH+ytI3wptChy0=";
}; };
vendorHash = "sha256-rZHM0HwiTNbUuJmlNOHg/XoYxqrKt59l5BL/vjm4Hfk="; vendorHash = "sha256-9Z++E4Lb1+VBvOx5GJ4yQuj7fpwUhlsMhavTifKxVw4=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config

View file

@ -44,6 +44,11 @@ stdenv.mkDerivation rec {
gtksourceview5 gtksourceview5
]; ];
postPatch = ''
substituteInPlace src/meson.build \
--replace "1.2.0" "${libadwaita.version}"
'';
postInstall = '' postInstall = ''
ln -s $out/bin/io.posidon.Paper $out/bin/paper ln -s $out/bin/io.posidon.Paper $out/bin/paper
''; '';

View file

@ -0,0 +1,57 @@
{ bash
, coreutils
, fetchFromGitHub
, ghostscript
, glibc
, gnome
, gnused
, lib
, resholve
, xorg
}:
resholve.mkDerivation rec {
pname = "pdfmm";
version = "unstable-2019-01-24";
src = fetchFromGitHub {
owner = "jpfleury";
repo = pname;
rev = "45ee7796659d23bb030bf06647f1af85e1d2b52d";
hash = "sha256-TOISD/2g7MwnLrtpMnfr2Ln0IiwlJVNavWl4eh/uwN0=";
};
dontBuild = true;
installPhase = ''
install -Dm 0755 pdfmm $out/bin/pdfmm
'';
solutions.default = {
scripts = [
"bin/pdfmm"
];
interpreter = "${bash}/bin/bash";
inputs = [
coreutils
ghostscript
glibc
gnome.zenity
gnused
xorg.xmessage
];
execer = [
"cannot:${glibc.bin}/bin/locale"
"cannot:${gnome.zenity}/bin/zenity"
"cannot:${xorg.xmessage}/bin/xmessage"
];
keep."$toutLu" = true;
};
meta = with lib; {
description = "Graphical assistant to reduce the size of a PDF file";
homepage = "https://github.com/jpfleury/pdfmm";
license = licenses.gpl3Only;
maintainers = with maintainers; [ urandom ];
};
}

View file

@ -10,11 +10,11 @@
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "gprojector"; pname = "gprojector";
version = "3.0.4"; version = "3.0.6";
src = fetchzip { src = fetchzip {
url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz"; url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz";
sha256 = "sha256-6EixVNRgYnuY9INb7gAyBzo125DhPEUPD+pGxjzmhy8="; sha256 = "sha256-aw/p6mbTJl023d46NUZV3pnP4WVdYqZTFmgGlHEKfq0=";
}; };
desktopItems = [ (makeDesktopItem { desktopItems = [ (makeDesktopItem {

View file

@ -223,6 +223,7 @@ stdenv.mkDerivation rec {
maintainers = with lib.maintainers; [ evils kiwi ]; maintainers = with lib.maintainers; [ evils kiwi ];
# kicad is cross platform # kicad is cross platform
platforms = lib.platforms.all; platforms = lib.platforms.all;
broken = stdenv.isDarwin;
hydraPlatforms = if (with3d) then [ ] else platforms; hydraPlatforms = if (with3d) then [ ] else platforms;
# We can't download the 3d models on Hydra, # We can't download the 3d models on Hydra,

View file

@ -3,22 +3,22 @@
{ {
"kicad" = { "kicad" = {
kicadVersion = { kicadVersion = {
version = "6.0.10"; version = "6.0.11";
src = { src = {
rev = "86aedd382b4ece39e27bef209e81792915103704"; rev = "2627ca5db025d40933329af642df28c4a2193dbf";
sha256 = "0pz8d96imc0q3nh7npr5zf0jkzi94wchvw57spcrgqfac9yrld3q"; sha256 = "1bhzmgs921wv1pc0mpyigmpp630086kmpifc3a91cbkv4xf0akkq";
}; };
}; };
libVersion = { libVersion = {
version = "6.0.10"; version = "6.0.11";
libSources = { libSources = {
symbols.rev = "3ec40517b37d78faf7ff5504c81362420c4b601f"; symbols.rev = "c2277d1e39c5e9ba5e04ca5ef3eb252a74291375";
symbols.sha256 = "1fwnr8x345jbifk71rhyd4b88c4ijp2rcw3pmivnwfb444hbr1lp"; symbols.sha256 = "1fwnr8x345jbifk71rhyd4b88c4ijp2rcw3pmivnwfb444hbr1lp";
templates.rev = "ae2b46f8756d79379b90fec01d4fdde1ccfd73c1"; templates.rev = "049baf307d2fdf5e6138ebab40a8be720b4ae62e";
templates.sha256 = "08zxh83fbygh1x2jhca8nrp3f9kihf7kmg65qmyp95wvps4p5h8v"; templates.sha256 = "08zxh83fbygh1x2jhca8nrp3f9kihf7kmg65qmyp95wvps4p5h8v";
footprints.rev = "24671f7754c74dfa528e6b62ebef33b161aa4ab6"; footprints.rev = "72fb90dda096bd59295ccc2c8c0881ee02a1221c";
footprints.sha256 = "1rs05n1wjb2w3x7xqkkijbdxyw3fj0fph8znvnsxp9bgwaaipd4h"; footprints.sha256 = "1rs05n1wjb2w3x7xqkkijbdxyw3fj0fph8znvnsxp9bgwaaipd4h";
packages3d.rev = "417c4ea884a0d1501061f511730604890bbb0a35"; packages3d.rev = "3fc9daed3ca80a1b6f3bbb1ef505f0dc79972d44";
packages3d.sha256 = "0nmvfchp25i4bkx6yf7fz1rwy7w6whj2w7mlp02ag3w5v4f137vz"; packages3d.sha256 = "0nmvfchp25i4bkx6yf7fz1rwy7w6whj2w7mlp02ag3w5v4f137vz";
}; };
}; };

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ginac"; pname = "ginac";
version = "1.8.4"; version = "1.8.5";
src = fetchurl { src = fetchurl {
url = "https://www.ginac.de/ginac-${version}.tar.bz2"; url = "https://www.ginac.de/ginac-${version}.tar.bz2";
sha256 = "sha256-J84Wrt/nRlGyI725JGwAWWt/+b9yeg06Rz9GcADaxJI="; sha256 = "sha256-wks3oecJ9mDQl4eH6GszSAPNKOwXaJzzbd/zgAc+omE=";
}; };
propagatedBuildInputs = [ cln ]; propagatedBuildInputs = [ cln ];

View file

@ -4,6 +4,7 @@
, libpng ? null , libpng ? null
, eigen ? null , eigen ? null
, libtiff ? null , libtiff ? null
, enableShared ? !stdenv.hostPlatform.isStatic
, enableExamples ? false , enableExamples ? false
, enableDocs ? false }: , enableDocs ? false }:
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
"-DCMAKE_CXX_FLAGS=-std=c++11" "-DCMAKE_CXX_FLAGS=-std=c++11"
"-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}" "-DOpenMVG_BUILD_EXAMPLES=${if enableExamples then "ON" else "OFF"}"
"-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}" "-DOpenMVG_BUILD_DOC=${if enableDocs then "ON" else "OFF"}"
]; ] ++ lib.optional enableShared "-DOpenMVG_BUILD_SHARED=ON";
cmakeDir = "./src"; cmakeDir = "./src";

View file

@ -1,18 +1,18 @@
{ lib { lib
, stdenv , stdenv
, buildGoPackage , buildGoModule
, fetchurl , fetchurl
, makeWrapper , makeWrapper
, git , git
, bash , bash
, gzip
, openssh , openssh
, gzip
, pam , pam
, pamSupport ? true , pamSupport ? true
, sqliteSupport ? true , sqliteSupport ? true
}: }:
buildGoPackage rec { buildGoModule rec {
pname = "forgejo"; pname = "forgejo";
version = "1.18.2-1"; version = "1.18.2-1";
@ -23,10 +23,13 @@ buildGoPackage rec {
hash = "sha256-XSh17AwPtC+Y24lgjjXJzT/uBHg+0hWZ2RZ/eNF4mCY="; hash = "sha256-XSh17AwPtC+Y24lgjjXJzT/uBHg+0hWZ2RZ/eNF4mCY=";
}; };
vendorHash = null;
subPackages = [ "." ];
outputs = [ "out" "data" ]; outputs = [ "out" "data" ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optional pamSupport pam; buildInputs = lib.optional pamSupport pam;
patches = [ patches = [
@ -39,22 +42,23 @@ buildGoPackage rec {
tags = lib.optional pamSupport "pam" tags = lib.optional pamSupport "pam"
++ lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ]; ++ lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
ldflags = [ ldflags = [
"-s"
"-w"
"-X main.Version=${version}" "-X main.Version=${version}"
"-X 'main.Tags=${lib.concatStringsSep " " tags}'" "-X 'main.Tags=${lib.concatStringsSep " " tags}'"
]; ];
postInstall = '' postInstall = ''
mkdir $data mkdir $data
cp -R ./go/src/${goPackagePath}/{public,templates,options} $data cp -R ./{public,templates,options} $data
mkdir -p $out mkdir -p $out
cp -R ./go/src/${goPackagePath}/options/locale $out/locale cp -R ./options/locale $out/locale
wrapProgram $out/bin/gitea \ wrapProgram $out/bin/gitea \
--prefix PATH : ${lib.makeBinPath [ bash git gzip openssh ]} --prefix PATH : ${lib.makeBinPath [ bash git gzip openssh ]}
''; '';
goPackagePath = "code.gitea.io/gitea";
meta = with lib; { meta = with lib; {
description = "A self-hosted lightweight software forge"; description = "A self-hosted lightweight software forge";
homepage = "https://forgejo.org"; homepage = "https://forgejo.org";

View file

@ -165,6 +165,7 @@ buildFHSUserEnv {
writeText "davinci-wrapper" writeText "davinci-wrapper"
'' ''
export QT_XKB_CONFIG_ROOT="${xkeyboard_config}/share/X11/xkb" export QT_XKB_CONFIG_ROOT="${xkeyboard_config}/share/X11/xkb"
export QT_PLUGIN_PATH="${davinci}/libs/plugins:$QT_PLUGIN_PATH"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci}/libs export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${davinci}/libs
${davinci}/bin/resolve ${davinci}/bin/resolve
'' ''

View file

@ -30,6 +30,8 @@
obs-source-record = callPackage ./obs-source-record.nix { }; obs-source-record = callPackage ./obs-source-record.nix { };
obs-vaapi = callPackage ./obs-vaapi { };
obs-vkcapture = callPackage ./obs-vkcapture.nix { obs-vkcapture = callPackage ./obs-vkcapture.nix {
obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture; obs-vkcapture32 = pkgsi686Linux.obs-studio-plugins.obs-vkcapture;
}; };

View file

@ -10,13 +10,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "obs-gstreamer"; pname = "obs-gstreamer";
version = "0.3.5"; version = "0.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "fzwoch"; owner = "fzwoch";
repo = "obs-gstreamer"; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-zP1MMoXLp+gp0fjVbWi/Wse6I8u9/K2IeSew3OjkCkE="; hash = "sha256-C4yee7hzkSOjIeaacLaTGPzZ1qYdYtHK5a3m9gz2pPI=";
}; };
nativeBuildInputs = [ pkg-config meson ninja ]; nativeBuildInputs = [ pkg-config meson ninja ];
@ -25,7 +25,6 @@ stdenv.mkDerivation rec {
# - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin; # - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin;
# - without gst-plugins-base it won't even show proper errors in logs; # - without gst-plugins-base it won't even show proper errors in logs;
# - Without gst-plugins-bad it won't find element "h264parse"; # - Without gst-plugins-bad it won't find element "h264parse";
# - gst-vaapi adds "VA-API" to "Encoder type";
# - gst-plugins-ugly adds "x264" to "Encoder type"; # - gst-plugins-ugly adds "x264" to "Encoder type";
# Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help. # Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help.
passthru.obsWrapperArguments = passthru.obsWrapperArguments =
@ -36,11 +35,15 @@ stdenv.mkDerivation rec {
gstreamer gstreamer
gst-plugins-base gst-plugins-base
gst-plugins-bad gst-plugins-bad
gst-plugins-ugly gst-plugins-ugly
gst-vaapi
]; ];
# Fix output directory
postInstall = ''
mkdir $out/lib/obs-plugins
mv $out/lib/obs-gstreamer.so $out/lib/obs-plugins/
'';
meta = with lib; { meta = with lib; {
description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio"; description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio";
homepage = "https://github.com/fzwoch/obs-gstreamer"; homepage = "https://github.com/fzwoch/obs-gstreamer";

View file

@ -0,0 +1,49 @@
{ lib
, stdenv
, fetchFromGitHub
, gst_all_1
, pciutils
, pkg-config
, meson
, ninja
, obs-studio
}:
stdenv.mkDerivation rec {
pname = "obs-vaapi";
version = "0.1.0";
src = fetchFromGitHub {
owner = "fzwoch";
repo = pname;
rev = version;
hash = "sha256-qA4xVVShkp40QHp2HmmRzVxQaBwskRpUNEULKetVMu8=";
};
nativeBuildInputs = [ pkg-config meson ninja ];
buildInputs = with gst_all_1; [ gstreamer gst-plugins-base obs-studio pciutils ];
# - We need "getLib" instead of default derivation, otherwise it brings gstreamer-bin;
# - without gst-plugins-base it won't even show proper errors in logs;
# - Without gst-plugins-bad it won't find element "vapostproc";
# - gst-vaapi adds "VA-API" to "Encoder type";
# Tip: "could not link appsrc to videoconvert1" can mean a lot of things, enable GST_DEBUG=2 for help.
passthru.obsWrapperArguments =
let
gstreamerHook = package: "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${lib.getLib package}/lib/gstreamer-1.0";
in
with gst_all_1; builtins.map gstreamerHook [
gstreamer
gst-plugins-base
gst-plugins-bad
gst-vaapi
];
meta = with lib; {
description = "OBS Studio VAAPI support via GStreamer";
homepage = "https://github.com/fzwoch/obs-vaapi";
maintainers = with maintainers; [ ahuzik pedrohlc ];
license = licenses.gpl2Plus;
platforms = [ "x86_64-linux" "i686-linux" ];
};
}

View file

@ -24,7 +24,7 @@ symlinkJoin {
"$out/bin/obs" "$out/bin/obs"
''--set OBS_PLUGINS_PATH "${pluginsJoined}/lib/obs-plugins"'' ''--set OBS_PLUGINS_PATH "${pluginsJoined}/lib/obs-plugins"''
''--set OBS_PLUGINS_DATA_PATH "${pluginsJoined}/share/obs/obs-plugins"'' ''--set OBS_PLUGINS_DATA_PATH "${pluginsJoined}/share/obs/obs-plugins"''
] ++ pluginArguments; ] ++ lists.unique pluginArguments;
in '' in ''
${concatStringsSep " " wrapCommandLine} ${concatStringsSep " " wrapCommandLine}

View file

@ -67,5 +67,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/containers/krunvm"; homepage = "https://github.com/containers/krunvm";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ nickcao ]; maintainers = with maintainers; [ nickcao ];
platforms = libkrun.meta.platforms;
}; };
} }

View file

@ -0,0 +1,112 @@
{ stdenvNoCC
, lib
, fetchurl
, writeScript
, installShellFiles
, qemu
, makeBinaryWrapper
, autoPatchelfHook
}:
let
version = "0.14.2";
dist = {
aarch64-darwin = rec {
archSuffix = "Darwin-arm64";
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
sha256 = "8334d83ca9555271b9843040066057dd8462a774f60dfaedbe97fae3834c3894";
};
x86_64-darwin = rec {
archSuffix = "Darwin-x86_64";
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
sha256 = "3866113c92619f0041ff6fc68fef2bf16e751058b9237289b2bea8fb960bdab0";
};
aarch64-linux = rec {
archSuffix = "Linux-aarch64";
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
sha256 = "373be7ebcf5932570c384c6bfb159cd418011b98a18c26ba0467827dad302230";
};
x86_64-linux = rec {
archSuffix = "Linux-x86_64";
url = "https://github.com/lima-vm/lima/releases/download/v${version}/lima-${version}-${archSuffix}.tar.gz";
sha256 = "44cae71eae65673afcc22c557f6385aa98792aecbb43195de48217581ae39143";
};
};
in
stdenvNoCC.mkDerivation {
inherit version;
pname = "lima";
src = fetchurl {
inherit (dist.${stdenvNoCC.hostPlatform.system} or
(throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}")) url sha256;
};
sourceRoot = ".";
nativeBuildInputs = [ makeBinaryWrapper installShellFiles ]
++ lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r bin share $out
chmod +x $out/bin/limactl
wrapProgram $out/bin/limactl \
--prefix PATH : ${lib.makeBinPath [ qemu ]}
installShellCompletion --cmd limactl \
--bash <($out/bin/limactl completion bash) \
--fish <($out/bin/limactl completion fish) \
--zsh <($out/bin/limactl completion zsh)
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
USER=nix $out/bin/limactl validate $out/share/lima/examples/default.yaml
USER=nix $out/bin/limactl validate $out/share/lima/examples/experimental/vz.yaml
'';
# Stripping removes entitlements of the binary on Darwin making it non-operational.
# Therefore, disable stripping on Darwin.
dontStrip = stdenvNoCC.isDarwin;
passthru.updateScript =
let
lima-bin = builtins.toString ./bin.nix;
in
writeScript "update-lima-bin.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts curl jq gawk
set -eou pipefail
LATEST_VERSION=$(curl -H "Accept: application/vnd.github+json" -Ls https://api.github.com/repos/lima-vm/lima/releases/latest | jq -r .tag_name | cut -c 2-)
curl -Ls -o SHA256SUMS https://github.com/lima-vm/lima/releases/download/v$LATEST_VERSION/SHA256SUMS
AARCH64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-arm64/{print $1}')
X86_64_DARWIN_SHA256=$(cat SHA256SUMS | awk '/Darwin-x86_64/{print $1}')
AARCH64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-aarch64/{print $1}')
X86_64_LINUX_SHA256=$(cat SHA256SUMS | awk '/Linux-x86_64/{print $1}')
# reset version first so that all platforms are always updated and in sync
update-source-version lima-bin 0 ${lib.fakeSha256} --file=${lima-bin} --system=aarch64-darwin
update-source-version lima-bin $LATEST_VERSION $AARCH64_DARWIN_SHA256 --file=${lima-bin} --system=aarch64-darwin
update-source-version lima-bin 0 ${lib.fakeSha256} --file=${lima-bin} --system=x86_64-darwin
update-source-version lima-bin $LATEST_VERSION $X86_64_DARWIN_SHA256 --file=${lima-bin} --system=x86_64-darwin
update-source-version lima-bin 0 ${lib.fakeSha256} --file=${lima-bin} --system=aarch64-linux
update-source-version lima-bin $LATEST_VERSION $AARCH64_LINUX_SHA256 --file=${lima-bin} --system=aarch64-linux
update-source-version lima-bin 0 ${lib.fakeSha256} --file=${lima-bin} --system=x86_64-linux
update-source-version lima-bin $LATEST_VERSION $X86_64_LINUX_SHA256 --file=${lima-bin} --system=x86_64-linux
rm SHA256SUMS
'';
meta = with lib; {
homepage = "https://github.com/lima-vm/lima";
description = "Linux virtual machines (on macOS, in most cases)";
license = licenses.asl20;
maintainers = with maintainers; [ tricktron ];
};
}

View file

@ -3,16 +3,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "wmfocus"; pname = "wmfocus";
version = "1.3.0"; version = "1.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "svenstaro"; owner = "svenstaro";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-HrS+C/6KDG2Rn/3u/mMmp4vzQ5YAHUFL4HFecteuzsc="; sha256 = "sha256-zXqPZORwi7X1wBTecPg9nOCvRHWNTtloCpgbPwtFhzo=";
}; };
cargoSha256 = "sha256-EzgYnfUgwK2ldzrlqe9N9jeGgK+RzQPjbOjJCGEkcwE="; cargoHash = "sha256-4eoV/viI7Q7I7mIqcHVAyPf/y2RWaWX0B+mLZWMEbcI=";
nativeBuildInputs = [ python3 pkg-config ]; nativeBuildInputs = [ python3 pkg-config ];
buildInputs = [ cairo libxkbcommon xorg.xcbutilkeysyms ]; buildInputs = [ cairo libxkbcommon xorg.xcbutilkeysyms ];

View file

@ -16,13 +16,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "swaylock-effects"; pname = "swaylock-effects";
version = "1.6.10"; version = "1.6.11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jirutka"; owner = "jirutka";
repo = "swaylock-effects"; repo = "swaylock-effects";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-VkyH9XN/pR1UY/liG5ygDHp+ymdqCPeWHyU7/teJGbU="; sha256 = "sha256-MKmWVYssO9HAcP5uqwpy9kDa6/kfZyV2NI7ibozt7Ug=";
}; };
postPatch = '' postPatch = ''

View file

@ -83,9 +83,12 @@ let
inherit (args) src; inherit (args) src;
inherit (go) GOOS GOARCH; inherit (go) GOOS GOARCH;
prePatch = args.prePatch or "";
patches = args.patches or []; patches = args.patches or [];
patchFlags = args.patchFlags or []; patchFlags = args.patchFlags or [];
postPatch = args.postPatch or "";
preBuild = args.preBuild or ""; preBuild = args.preBuild or "";
postBuild = args.postBuild or "";
sourceRoot = args.sourceRoot or ""; sourceRoot = args.sourceRoot or "";
GO111MODULE = "on"; GO111MODULE = "on";

View file

@ -17,20 +17,20 @@ let
pname = "vimix-gtk-themes"; pname = "vimix-gtk-themes";
in in
lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "grey" ] themeVariants lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "jade" "grey" "all" ] themeVariants
lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" "all" ] sizeVariants
lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
inherit pname; inherit pname;
version = "2022-10-30"; version = "2023-01-25";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vinceliuice"; owner = "vinceliuice";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "QGKh2Md25VNVqy58w/LBzNnEM+g4gBMUjj0W0IuVZ1U="; sha256 = "4IJMLSUsZvtPfuMS+NYkKo8K3laec2YJk20d5tL0vKI=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -15,7 +15,7 @@
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "warpinator"; pname = "warpinator";
version = "1.4.3"; version = "1.4.4";
format = "other"; format = "other";
@ -23,7 +23,7 @@ python3.pkgs.buildPythonApplication rec {
owner = "linuxmint"; owner = "linuxmint";
repo = pname; repo = pname;
rev = version; rev = version;
hash = "sha256-blsDOAdfu0N6I+6ZvycL+BIIsZPIjwYm+sJnbZtHJE8="; hash = "sha256-oHJOwdCvHnPalTHb5E3mNDYBaR9ZvlV1F6ux7nejBlc=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -1,82 +0,0 @@
From cc47fa33893e6840463ef8d59f9f4de4b7563726 Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Sat, 4 Dec 2021 22:00:38 +0800
Subject: [PATCH] Add meson option for overlaying logo on wallpaper
---
meson.build | 8 ++++++++
meson_options.txt | 1 +
src/Views/OperatingSystemView.vala | 8 ++++++++
3 files changed, 17 insertions(+)
create mode 100644 meson_options.txt
diff --git a/meson.build b/meson.build
index 2125de6e..cbe3cadd 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,14 @@ add_project_arguments(
vapi_dir = join_paths(meson.current_source_dir(), 'vapi')
add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
+vala_flags = []
+
+if get_option('wallpaper')
+ vala_flags += ['--define', 'WALLPAPER']
+endif
+
+add_project_arguments(vala_flags, language: 'vala')
+
subdir('data')
subdir('src')
subdir('po')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..8cef0bb3
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('wallpaper', type : 'boolean', value : true, description : 'Overlay logo on default wallpaper')
diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala
index fdb92e7e..6110d1aa 100644
--- a/src/Views/OperatingSystemView.vala
+++ b/src/Views/OperatingSystemView.vala
@@ -39,6 +39,7 @@ public class About.OperatingSystemView : Gtk.Grid {
logo_icon_name = "distributor-logo";
}
+#if WALLPAPER
var logo = new Hdy.Avatar (128, "", false) {
// In case the wallpaper can't be loaded, we don't want an icon or text
icon_name = "invalid-icon-name",
@@ -53,6 +54,7 @@ public class About.OperatingSystemView : Gtk.Grid {
}
});
logo.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+#endif
var icon = new Gtk.Image () {
icon_name = logo_icon_name + "-symbolic",
@@ -64,9 +66,11 @@ public class About.OperatingSystemView : Gtk.Grid {
icon_style_context.add_class ("logo");
icon_style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
+#if WALLPAPER
var logo_overlay = new Gtk.Overlay ();
logo_overlay.add (logo);
logo_overlay.add_overlay (icon);
+#endif
// Intentionally not using GLib.OsInfoKey.PRETTY_NAME here because we
// want more granular control over text formatting
@@ -145,7 +149,11 @@ public class About.OperatingSystemView : Gtk.Grid {
valign = Gtk.Align.CENTER,
vexpand = true
};
+#if WALLPAPER
software_grid.attach (logo_overlay, 0, 0, 1, 4);
+#else
+ software_grid.attach (icon, 0, 0, 1, 4);
+#endif
software_grid.attach (title, 1, 0, 3);
software_grid.attach (kernel_version_label, 1, 2, 3);

View file

@ -8,32 +8,27 @@
, vala , vala
, libgee , libgee
, libgtop , libgtop
, libgudev
, libhandy , libhandy
, granite , granite
, gtk3 , gtk3
, switchboard , switchboard
, udisks2
, fwupd , fwupd
, appstream , appstream
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "switchboard-plug-about"; pname = "switchboard-plug-about";
version = "6.1.0"; version = "6.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "elementary"; owner = "elementary";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-/8K3xSbzlagOT0zHdXNwEERJP88C+H2I6qJHXwdlTS4="; sha256 = "sha256-MJybc2yAchU6qMqkoRz45QdhR7bj/UFk2nyxcBivsHI=";
}; };
patches = [
# Introduces a wallpaper meson flag.
# The wallpapaper path does not exist on NixOS, let's just remove the wallpaper.
# https://github.com/elementary/switchboard-plug-about/pull/236
./add-wallpaper-option.patch
];
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja
@ -48,12 +43,14 @@ stdenv.mkDerivation rec {
gtk3 gtk3
libgee libgee
libgtop libgtop
libgudev
libhandy libhandy
switchboard switchboard
udisks2
]; ];
mesonFlags = [ mesonFlags = [
# This option is introduced in add-wallpaper-option.patch # Does not play nice with the nix-snowflake logo
"-Dwallpaper=false" "-Dwallpaper=false"
]; ];

View file

@ -17,8 +17,6 @@
, ... , ...
}@attrs: }@attrs:
with lib;
let let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info"; debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "+debug_info";
@ -107,4 +105,4 @@ let
}; };
}); });
in in
fix pkg lib.fix pkg

View file

@ -5,8 +5,6 @@
, hexPkg ? name , hexPkg ? name
, ... }@attrs: , ... }@attrs:
with lib;
let let
pkg = self: builder (attrs // { pkg = self: builder (attrs // {
@ -17,4 +15,4 @@ let
}; };
}); });
in in
fix pkg lib.fix pkg

View file

@ -15,7 +15,6 @@
, ... , ...
}@attrs: }@attrs:
with lib;
let let
shell = drv: stdenv.mkDerivation { shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.name}"; name = "interactive-shell-${drv.name}";
@ -90,5 +89,5 @@ let
}; };
}); });
in in
fix pkg lib.fix pkg

View file

@ -16,8 +16,6 @@
, ... , ...
}@attrs: }@attrs:
with lib;
let let
debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info"; debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) "debug-info";
@ -30,7 +28,7 @@ let
buildInputs = [ drv ]; buildInputs = [ drv ];
}; };
customPhases = filterAttrs customPhases = lib.filterAttrs
(_: v: v != null) (_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; }; { inherit setupHook configurePhase buildPhase installPhase; };
@ -40,7 +38,7 @@ let
inherit version; inherit version;
buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ]; buildInputs = buildInputs ++ [ erlang rebar3 openssl libyaml ];
propagatedBuildInputs = unique beamDeps; propagatedBuildInputs = lib.unique beamDeps;
inherit src; inherit src;
@ -85,4 +83,4 @@ let
}; };
} // customPhases); } // customPhases);
in in
fix pkg lib.fix pkg

View file

@ -6,8 +6,6 @@
, meta ? { } , meta ? { }
}: }:
with lib;
stdenv.mkDerivation ({ stdenv.mkDerivation ({
pname = "hex-source-${pkg}"; pname = "hex-source-${pkg}";
inherit version; inherit version;

View file

@ -7,8 +7,6 @@
, meta ? { } , meta ? { }
}: }:
with lib;
stdenv.mkDerivation ({ stdenv.mkDerivation ({
pname = "rebar-deps-${name}"; pname = "rebar-deps-${name}";
inherit version; inherit version;

View file

@ -22,15 +22,13 @@
, ... , ...
}@attrs: }@attrs:
with lib;
let let
shell = drv: stdenv.mkDerivation { shell = drv: stdenv.mkDerivation {
name = "interactive-shell-${drv.pname}"; name = "interactive-shell-${drv.pname}";
buildInputs = [ drv ]; buildInputs = [ drv ];
}; };
customPhases = filterAttrs customPhases = lib.filterAttrs
(_: v: v != null) (_: v: v != null)
{ inherit setupHook configurePhase buildPhase installPhase; }; { inherit setupHook configurePhase buildPhase installPhase; };
@ -105,4 +103,4 @@ let
} // (if attrs ? passthru then attrs.passthru else { })); } // (if attrs ? passthru then attrs.passthru else { }));
} // customPhases); } // customPhases);
in in
fix pkg lib.fix pkg

View file

@ -3,7 +3,6 @@
, bison, flex , bison, flex
, makeWrapper }: , makeWrapper }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "intercal"; pname = "intercal";
@ -31,7 +30,7 @@ stdenv.mkDerivation rec {
wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
''; '';
meta = { meta = with lib; {
description = "The original esoteric programming language"; description = "The original esoteric programming language";
longDescription = '' longDescription = ''
INTERCAL, an abbreviation for "Compiler Language With No INTERCAL, an abbreviation for "Compiler Language With No

View file

@ -1,8 +1,6 @@
{ stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript { stdenv, lib, fetchurl, makeWrapper, jre, gnugrep, coreutils, writeScript
, common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }: , common-updater-scripts, git, gnused, nix, nixfmt, majorVersion }:
with lib;
let let
repo = "git@github.com:scala/scala.git"; repo = "git@github.com:scala/scala.git";
@ -102,7 +100,7 @@ stdenv.mkDerivation rec {
''; '';
}; };
meta = { meta = with lib; {
description = "A general purpose programming language"; description = "A general purpose programming language";
longDescription = '' longDescription = ''
Scala is a general purpose programming language designed to express Scala is a general purpose programming language designed to express

View file

@ -1,11 +1,9 @@
{ lib, stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null { lib, stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
, excludePorts ? [] }: , excludePorts ? [] }:
with lib;
let let
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8 # choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]); excludedPorts = excludePorts ++ (lib.optionals (gputils == null) [ "pic14" "pic16" ]);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -29,7 +27,7 @@ stdenv.mkDerivation rec {
fi fi
''; '';
meta = { meta = with lib; {
description = "Small Device C Compiler"; description = "Small Device C Compiler";
longDescription = '' longDescription = ''
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets SDCC is a retargettable, optimizing ANSI - C compiler suite that targets

View file

@ -8,11 +8,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "guile-json"; pname = "guile-json";
version = "4.7.2"; version = "4.7.3";
src = fetchurl { src = fetchurl {
url = "mirror://savannah/guile-json/${pname}-${version}.tar.gz"; url = "mirror://savannah/guile-json/${pname}-${version}.tar.gz";
sha256 = "sha256-lCq37FtAhWeZwMqfuBkhrxf8Q2CuvvHMjLH2rZIg1Rk="; sha256 = "sha256-OLoEjtKdEvBbMsWy+3pReVxEi0HkA6Kxty/wA1gX84g=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View file

@ -1,6 +1,5 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }: { lib, stdenv, fetchFromGitHub, pkg-config, doxygen, cmake, readline }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lolcode"; pname = "lolcode";
@ -19,7 +18,7 @@ stdenv.mkDerivation rec {
# Maybe it clashes with lci scientific logic software package... # Maybe it clashes with lci scientific logic software package...
postInstall = "mv $out/bin/lci $out/bin/lolcode-lci"; postInstall = "mv $out/bin/lci $out/bin/lolcode-lci";
meta = { meta = with lib; {
homepage = "http://lolcode.org"; homepage = "http://lolcode.org";
description = "An esoteric programming language"; description = "An esoteric programming language";
longDescription = '' longDescription = ''

View file

@ -12,8 +12,6 @@ assert (enableCrypt -> (libxcrypt != null));
# cgit) that are needed here should be included directly in Nixpkgs as # cgit) that are needed here should be included directly in Nixpkgs as
# files. # files.
with lib;
let let
libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr"; libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
@ -33,7 +31,7 @@ let
strictDeps = true; strictDeps = true;
# TODO: Add a "dev" output containing the header files. # TODO: Add a "dev" output containing the header files.
outputs = [ "out" "man" "devdoc" ] ++ outputs = [ "out" "man" "devdoc" ] ++
optional crossCompiling "mini"; lib.optional crossCompiling "mini";
setOutputFlags = false; setOutputFlags = false;
# On FreeBSD, if Perl is built with threads support, having # On FreeBSD, if Perl is built with threads support, having
@ -57,9 +55,9 @@ let
# Enable TLS/SSL verification in HTTP::Tiny by default # Enable TLS/SSL verification in HTTP::Tiny by default
./http-tiny-verify-ssl-by-default.patch ./http-tiny-verify-ssl-by-default.patch
] ]
++ optional stdenv.isSunOS ./ld-shared.patch ++ lib.optional stdenv.isSunOS ./ld-shared.patch
++ optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ] ++ lib.optionals stdenv.isDarwin [ ./cpp-precomp.patch ./sw_vers.patch ]
++ optional crossCompiling ./MakeMaker-cross.patch; ++ lib.optional crossCompiling ./MakeMaker-cross.patch;
# This is not done for native builds because pwd may need to come from # This is not done for native builds because pwd may need to come from
# bootstrap tools when building bootstrap perl. # bootstrap tools when building bootstrap perl.
@ -93,18 +91,18 @@ let
"-Dlocincpth=${libcInc}/include" "-Dlocincpth=${libcInc}/include"
"-Dloclibpth=${libcLib}/lib" "-Dloclibpth=${libcLib}/lib"
] ]
++ optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ] ++ lib.optionals ((builtins.match ''5\.[0-9]*[13579]\..+'' version) != null) [ "-Dusedevel" "-Uversiononly" ]
++ optional stdenv.isSunOS "-Dcc=gcc" ++ lib.optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads" ++ lib.optional enableThreading "-Dusethreads"
++ optional (!enableCrypt) "-A clear:d_crypt_r" ++ lib.optional (!enableCrypt) "-A clear:d_crypt_r"
++ optional stdenv.hostPlatform.isStatic "--all-static" ++ lib.optional stdenv.hostPlatform.isStatic "--all-static"
++ optionals (!crossCompiling) [ ++ lib.optionals (!crossCompiling) [
"-Dprefix=${placeholder "out"}" "-Dprefix=${placeholder "out"}"
"-Dman1dir=${placeholder "out"}/share/man/man1" "-Dman1dir=${placeholder "out"}/share/man/man1"
"-Dman3dir=${placeholder "out"}/share/man/man3" "-Dman3dir=${placeholder "out"}/share/man/man3"
]; ];
configureScript = optionalString (!crossCompiling) "${stdenv.shell} ./Configure"; configureScript = lib.optionalString (!crossCompiling) "${stdenv.shell} ./Configure";
dontAddStaticConfigureFlags = true; dontAddStaticConfigureFlags = true;
@ -138,9 +136,9 @@ let
OLD_ZLIB = False OLD_ZLIB = False
GZIP_OS_CODE = AUTO_DETECT GZIP_OS_CODE = AUTO_DETECT
EOF EOF
'' + optionalString stdenv.isDarwin '' '' + lib.optionalString stdenv.isDarwin ''
substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" "" substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
'' + optionalString (!enableThreading) '' '' + lib.optionalString (!enableThreading) ''
# We need to do this because the bootstrap doesn't have a static libpthread # We need to do this because the bootstrap doesn't have a static libpthread
sed -i 's,\(libswanted.*\)pthread,\1,g' Configure sed -i 's,\(libswanted.*\)pthread,\1,g' Configure
''; '';
@ -183,7 +181,7 @@ let
}" /no-such-path \ }" /no-such-path \
--replace "${stdenv.cc}" /no-such-path \ --replace "${stdenv.cc}" /no-such-path \
--replace "$man" /no-such-path --replace "$man" /no-such-path
'' + optionalString crossCompiling '' + lib.optionalString crossCompiling
'' ''
mkdir -p $mini/lib/perl5/cross_perl/${version} mkdir -p $mini/lib/perl5/cross_perl/${version}
for dir in cnf/{stub,cpan}; do for dir in cnf/{stub,cpan}; do
@ -207,7 +205,7 @@ let
"$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch" "$mini/lib/perl5/cross_perl/${version}:$out/lib/perl5/${version}:$out/lib/perl5/${version}/$runtimeArch"
''; # */ ''; # */
meta = { meta = with lib; {
homepage = "https://www.perl.org/"; homepage = "https://www.perl.org/";
description = "The standard implementation of the Perl 5 programmming language"; description = "The standard implementation of the Perl 5 programmming language";
license = licenses.artistic1; license = licenses.artistic1;
@ -215,7 +213,7 @@ let
platforms = platforms.all; platforms = platforms.all;
priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl` priority = 6; # in `buildEnv' (including the one inside `perl.withPackages') the library files will have priority over files in `perl`
}; };
} // optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec { } // lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) rec {
crossVersion = "c876045741f5159318085d2737b0090f35a842ca"; # June 5, 2022 crossVersion = "c876045741f5159318085d2737b0090f35a842ca"; # June 5, 2022
perl-cross-src = fetchFromGitHub { perl-cross-src = fetchFromGitHub {

View file

@ -1,5 +1,4 @@
{ lib, stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }: { lib, stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "picoLisp"; pname = "picoLisp";
@ -9,11 +8,11 @@ stdenv.mkDerivation rec {
sha256 = "0l51x98bn1hh6kv40sdgp0x09pzg5i8yxbcjvm9n5bxsd6bbk5w2"; sha256 = "0l51x98bn1hh6kv40sdgp0x09pzg5i8yxbcjvm9n5bxsd6bbk5w2";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [openssl] ++ optional stdenv.is64bit jdk; buildInputs = [openssl] ++ lib.optional stdenv.is64bit jdk;
patchPhase = '' patchPhase = ''
sed -i "s/which java/command -v java/g" mkAsm sed -i "s/which java/command -v java/g" mkAsm
${optionalString stdenv.isAarch32 '' ${lib.optionalString stdenv.isAarch32 ''
sed -i s/-m32//g Makefile sed -i s/-m32//g Makefile
cat >>Makefile <<EOF cat >>Makefile <<EOF
ext.o: ext.c ext.o: ext.c
@ -23,7 +22,7 @@ stdenv.mkDerivation rec {
EOF EOF
''} ''}
''; '';
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}''; sourceRoot = ''picoLisp/src${lib.optionalString stdenv.is64bit "64"}'';
postBuild = '' postBuild = ''
cd ../src; make gate cd ../src; make gate
''; '';
@ -49,7 +48,7 @@ stdenv.mkDerivation rec {
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp" ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
''; '';
meta = { meta = with lib; {
# darwin: build times out # darwin: build times out
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
description = "A simple Lisp with an integrated database"; description = "A simple Lisp with an integrated database";

View file

@ -54,8 +54,6 @@ assert lib.assertMsg (reproducibleBuild -> (!enableOptimizations))
assert lib.assertMsg (reproducibleBuild -> (!rebuildBytecode)) assert lib.assertMsg (reproducibleBuild -> (!rebuildBytecode))
"Deterministic builds are not achieved when (default unoptimized) bytecode is created."; "Deterministic builds are not achieved when (default unoptimized) bytecode is created.";
with lib;
let let
buildPackages = pkgsBuildHost; buildPackages = pkgsBuildHost;
inherit (passthru) pythonForBuild; inherit (passthru) pythonForBuild;
@ -133,9 +131,9 @@ let
# * https://github.com/python/cpython/commit/e6b247c8e524 # * https://github.com/python/cpython/commit/e6b247c8e524
../3.7/no-win64-workaround.patch ../3.7/no-win64-workaround.patch
] ++ optionals (x11Support && stdenv.isDarwin) [ ] ++ lib.optionals (x11Support && stdenv.isDarwin) [
./use-correct-tcl-tk-on-darwin.patch ./use-correct-tcl-tk-on-darwin.patch
] ++ optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
# Disable the use of ldconfig in ctypes.util.find_library (since # Disable the use of ldconfig in ctypes.util.find_library (since
# ldconfig doesn't work on NixOS), and don't use # ldconfig doesn't work on NixOS), and don't use
@ -147,7 +145,7 @@ let
# Fix ctypes.util.find_library with gcc10. # Fix ctypes.util.find_library with gcc10.
./find_library-gcc10.patch ./find_library-gcc10.patch
] ++ optionals stdenv.hostPlatform.isCygwin [ ] ++ lib.optionals stdenv.hostPlatform.isCygwin [
./2.5.2-ctypes-util-find_library.patch ./2.5.2-ctypes-util-find_library.patch
./2.5.2-tkinter-x11.patch ./2.5.2-tkinter-x11.patch
./2.6.2-ssl-threads.patch ./2.6.2-ssl-threads.patch
@ -158,7 +156,7 @@ let
./2.7.3-dylib.patch ./2.7.3-dylib.patch
./2.7.3-getpath-exe-extension.patch ./2.7.3-getpath-exe-extension.patch
./2.7.3-no-libm.patch ./2.7.3-no-libm.patch
] ++ optionals hasDistutilsCxxPatch [ ] ++ lib.optionals hasDistutilsCxxPatch [
# Patch from http://bugs.python.org/issue1222585 adapted to work with # Patch from http://bugs.python.org/issue1222585 adapted to work with
# `patch -p1' and with a last hunk removed # `patch -p1' and with a last hunk removed
@ -166,7 +164,7 @@ let
# only works for GCC and Apple Clang. This makes distutils to call C++ # only works for GCC and Apple Clang. This makes distutils to call C++
# compiler when needed. # compiler when needed.
./python-2.7-distutils-C++.patch ./python-2.7-distutils-C++.patch
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
./cross-compile.patch ./cross-compile.patch
]; ];
@ -175,31 +173,31 @@ let
for i in /usr /sw /opt /pkg; do for i in /usr /sw /opt /pkg; do
substituteInPlace ./setup.py --replace $i /no-such-path substituteInPlace ./setup.py --replace $i /no-such-path
done done
'' + optionalString (stdenv ? cc && stdenv.cc.libc != null) '' '' + lib.optionalString (stdenv ? cc && stdenv.cc.libc != null) ''
for i in Lib/plat-*/regen; do for i in Lib/plat-*/regen; do
substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/ substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/
done done
'' + optionalString stdenv.isDarwin '' '' + lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
substituteInPlace Lib/multiprocessing/__init__.py \ substituteInPlace Lib/multiprocessing/__init__.py \
--replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")' --replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
''; '';
configureFlags = optionals enableOptimizations [ configureFlags = lib.optionals enableOptimizations [
"--enable-optimizations" "--enable-optimizations"
] ++ optionals (!static) [ ] ++ lib.optionals (!static) [
"--enable-shared" "--enable-shared"
] ++ [ ] ++ [
"--with-threads" "--with-threads"
"--with-system-ffi" "--with-system-ffi"
"--with-system-expat" "--with-system-expat"
"--enable-unicode=ucs${toString ucsEncoding}" "--enable-unicode=ucs${toString ucsEncoding}"
] ++ optionals stdenv.hostPlatform.isCygwin [ ] ++ lib.optionals stdenv.hostPlatform.isCygwin [
"ac_cv_func_bind_textdomain_codeset=yes" "ac_cv_func_bind_textdomain_codeset=yes"
] ++ optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
"--disable-toolbox-glue" "--disable-toolbox-glue"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"PYTHON_FOR_BUILD=${getBin buildPackages.python}/bin/python" "PYTHON_FOR_BUILD=${lib.getBin buildPackages.python}/bin/python"
"ac_cv_buggy_getaddrinfo=no" "ac_cv_buggy_getaddrinfo=no"
# Assume little-endian IEEE 754 floating point when cross compiling # Assume little-endian IEEE 754 floating point when cross compiling
"ac_cv_little_endian_double=yes" "ac_cv_little_endian_double=yes"
@ -223,23 +221,23 @@ let
] ]
# Never even try to use lchmod on linux, # Never even try to use lchmod on linux,
# don't rely on detecting glibc-isms. # don't rely on detecting glibc-isms.
++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no" ++ lib.optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"
++ optional static "LDFLAGS=-static"; ++ lib.optional static "LDFLAGS=-static";
strictDeps = true; strictDeps = true;
buildInputs = buildInputs =
optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++ lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc ++
[ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ] [ bzip2 openssl zlib libffi expat db gdbm ncurses sqlite readline ]
++ optionals x11Support [ tcl tk libX11 ] ++ lib.optionals x11Support [ tcl tk libX11 ]
++ optional (stdenv.isDarwin && configd != null) configd; ++ lib.optional (stdenv.isDarwin && configd != null) configd;
nativeBuildInputs = nativeBuildInputs =
[ autoreconfHook ] [ autoreconfHook ]
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform)
[ buildPackages.stdenv.cc buildPackages.python ]; [ buildPackages.stdenv.cc buildPackages.python ];
mkPaths = paths: { mkPaths = paths: {
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths; C_INCLUDE_PATH = lib.makeSearchPathOutput "dev" "include" paths;
LIBRARY_PATH = makeLibraryPath paths; LIBRARY_PATH = lib.makeLibraryPath paths;
}; };
# Python 2.7 needs this # Python 2.7 needs this
@ -258,13 +256,13 @@ in with passthru; stdenv.mkDerivation ({
LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH;
NIX_CFLAGS_COMPILE = optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2" NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.targetPlatform.system == "x86_64-darwin") "-msse2"
+ optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000"; + lib.optionalString stdenv.hostPlatform.isMusl " -DTHREAD_STACK_SIZE=0x100000";
DETERMINISTIC_BUILD = 1; DETERMINISTIC_BUILD = 1;
setupHook = python-setup-hook sitePackages; setupHook = python-setup-hook sitePackages;
postPatch = optionalString (x11Support && (tix != null)) '' postPatch = lib.optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'" substituteInPlace "Lib/lib-tk/Tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
''; '';
@ -291,18 +289,18 @@ in with passthru; stdenv.mkDerivation ({
# Determinism: Windows installers were not deterministic. # Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers. # We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f find "$out" -name 'wininst*.exe' | xargs -r rm -f
'' + optionalString stripBytecode '' '' + lib.optionalString stripBytecode ''
# Determinism: deterministic bytecode # Determinism: deterministic bytecode
# First we delete all old bytecode. # First we delete all old bytecode.
find $out -name "*.pyc" -delete find $out -name "*.pyc" -delete
'' + optionalString rebuildBytecode '' '' + lib.optionalString rebuildBytecode ''
# We build 3 levels of optimized bytecode. Note the default level, without optimizations, # We build 3 levels of optimized bytecode. Note the default level, without optimizations,
# is not reproducible yet. https://bugs.python.org/issue29708 # is not reproducible yet. https://bugs.python.org/issue29708
# Not creating bytecode will result in a large performance loss however, so we do build it. # Not creating bytecode will result in a large performance loss however, so we do build it.
find $out -name "*.py" | ${pythonForBuildInterpreter} -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | ${pythonForBuildInterpreter} -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -O -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | ${pythonForBuildInterpreter} -O -m compileall -q -f -x "lib2to3" -i -
find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i - find $out -name "*.py" | ${pythonForBuildInterpreter} -OO -m compileall -q -f -x "lib2to3" -i -
'' + optionalString stdenv.hostPlatform.isCygwin '' '' + lib.optionalString stdenv.hostPlatform.isCygwin ''
cp libpython2.7.dll.a $out/lib cp libpython2.7.dll.a $out/lib
''; '';
@ -311,14 +309,14 @@ in with passthru; stdenv.mkDerivation ({
postFixup = '' postFixup = ''
# Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7. # Include a sitecustomize.py file. Note it causes an error when it's in postInstall with 2.7.
cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py cp ${../../sitecustomize.py} $out/${sitePackages}/sitecustomize.py
'' + optionalString strip2to3 '' '' + lib.optionalString strip2to3 ''
rm -R $out/bin/2to3 $out/lib/python*/lib2to3 rm -R $out/bin/2to3 $out/lib/python*/lib2to3
'' + optionalString stripConfig '' '' + lib.optionalString stripConfig ''
rm -R $out/bin/python*-config $out/lib/python*/config* rm -R $out/bin/python*-config $out/lib/python*/config*
'' + optionalString stripIdlelib '' '' + lib.optionalString stripIdlelib ''
# Strip IDLE # Strip IDLE
rm -R $out/bin/idle* $out/lib/python*/idlelib rm -R $out/bin/idle* $out/lib/python*/idlelib
'' + optionalString stripTests '' '' + lib.optionalString stripTests ''
# Strip tests # Strip tests
rm -R $out/lib/python*/test $out/lib/python*/**/test{,s} rm -R $out/lib/python*/test $out/lib/python*/**/test{,s}
''; '';

View file

@ -3,8 +3,6 @@
, makePythonHook , makePythonHook
, makeWrapper }: , makeWrapper }:
with lib;
makePythonHook { makePythonHook {
name = "wrap-python-hook"; name = "wrap-python-hook";
deps = makeWrapper; deps = makeWrapper;
@ -20,7 +18,7 @@ makePythonHook {
mkStringSkipper = labelNum: quote: let mkStringSkipper = labelNum: quote: let
label = "q${toString labelNum}"; label = "q${toString labelNum}";
isSingle = elem quote [ "\"" "'\"'\"'" ]; isSingle = lib.elem quote [ "\"" "'\"'\"'" ];
endQuote = if isSingle then "[^\\\\]${quote}" else quote; endQuote = if isSingle then "[^\\\\]${quote}" else quote;
in '' in ''
/^[a-z]?${quote}/ { /^[a-z]?${quote}/ {
@ -46,8 +44,8 @@ makePythonHook {
:r :r
/\\$|,$/{N;br} /\\$|,$/{N;br}
/__future__|^ |^ *(#.*)?$/{n;br} /__future__|^ |^ *(#.*)?$/{n;br}
${concatImapStrings mkStringSkipper quoteVariants} ${lib.concatImapStrings mkStringSkipper quoteVariants}
/^[^# ]/i ${replaceStrings ["\n"] [";"] preamble} /^[^# ]/i ${lib.replaceStrings ["\n"] [";"] preamble}
} }
''; '';
} ./wrap.sh } ./wrap.sh

View file

@ -1,6 +1,6 @@
# Contains the ruby version heuristics # Contains the ruby version heuristics
{ lib }: { lib }:
with lib;
let let
# The returned set should be immutable # The returned set should be immutable
rubyVersion = major: minor: tiny: tail: rubyVersion = major: minor: tiny: tail:
@ -10,15 +10,15 @@ let
# Contains the patch number "223" if tail is "p223" or null # Contains the patch number "223" if tail is "p223" or null
patchLevel = patchLevel =
let let
p = removePrefix "p" tail; p = lib.removePrefix "p" tail;
isPosInt = num: isPosInt = num:
0 == stringLength 0 == lib.stringLength
(replaceStrings (lib.replaceStrings
["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"] ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9"]
["" "" "" "" "" "" "" "" "" "" ] ["" "" "" "" "" "" "" "" "" "" ]
num); num);
in in
if hasPrefix "p" tail && isPosInt p then p if lib.hasPrefix "p" tail && isPosInt p then p
else null; else null;
# Shortcuts # Shortcuts
@ -28,11 +28,11 @@ let
# Ruby separates lib and gem folders by ABI version which isn't very # Ruby separates lib and gem folders by ABI version which isn't very
# consistent. # consistent.
libDir = libDir =
if versionAtLeast majMinTiny "2.1.0" then if lib.versionAtLeast majMinTiny "2.1.0" then
"${majMin}.0" "${majMin}.0"
else if versionAtLeast majMinTiny "2.0.0" then else if lib.versionAtLeast majMinTiny "2.0.0" then
"2.0.0" "2.0.0"
else if versionAtLeast majMinTiny "1.9.1" then else if lib.versionAtLeast majMinTiny "1.9.1" then
"1.9.1" "1.9.1"
else else
throw "version ${majMinTiny} is not supported"; throw "version ${majMinTiny} is not supported";

View file

@ -1,6 +1,5 @@
{ lib, pkgs }: { lib, pkgs }:
with lib;
with pkgs.javaPackages; with pkgs.javaPackages;
let let
@ -10,7 +9,7 @@ let
poms = import ./poms.nix { inherit fetchMaven; }; poms = import ./poms.nix { inherit fetchMaven; };
in { in {
# Maven needs all of these to function # Maven needs all of these to function
mavenMinimal = flatten mavenMinimal = lib.flatten
collections.mavenLibs_2_0_6 collections.mavenLibs_2_0_6
++ collections.mavenLibs_2_0_9 ++ collections.mavenLibs_2_0_9
++ collections.mavenLibs_2_2_1 ++ collections.mavenLibs_2_2_1

View file

@ -11,17 +11,15 @@
# NOTE: When editing this expression see if the same change applies to # NOTE: When editing this expression see if the same change applies to
# SDL2 expression too # SDL2 expression too
with lib;
let let
extraPropagatedBuildInputs = [ ] extraPropagatedBuildInputs = [ ]
++ optionals x11Support [ libXext libICE libXrandr ] ++ lib.optionals x11Support [ libXext libICE libXrandr ]
++ optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ] ++ lib.optionals (openglSupport && stdenv.isLinux) [ libGL libGLU ]
++ optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ] ++ lib.optionals (openglSupport && stdenv.isDarwin) [ OpenGL GLUT ]
++ optional alsaSupport alsa-lib ++ lib.optional alsaSupport alsa-lib
++ optional pulseaudioSupport libpulseaudio ++ lib.optional pulseaudioSupport libpulseaudio
++ optional stdenv.isDarwin Cocoa; ++ lib.optional stdenv.isDarwin Cocoa;
rpath = makeLibraryPath extraPropagatedBuildInputs; rpath = lib.makeLibraryPath extraPropagatedBuildInputs;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -40,13 +38,13 @@ stdenv.mkDerivation rec {
outputBin = "dev"; # sdl-config outputBin = "dev"; # sdl-config
nativeBuildInputs = [ pkg-config ] nativeBuildInputs = [ pkg-config ]
++ optional stdenv.isLinux libcap; ++ lib.optional stdenv.isLinux libcap;
propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs; propagatedBuildInputs = [ libiconv ] ++ extraPropagatedBuildInputs;
buildInputs = [ ] buildInputs = [ ]
++ optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile ++ lib.optional (!stdenv.hostPlatform.isMinGW && alsaSupport) audiofile
++ optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ]; ++ lib.optionals stdenv.isDarwin [ AudioUnit CoreAudio CoreServices Kernel OpenGL ];
configureFlags = [ configureFlags = [
"--disable-oss" "--disable-oss"
@ -58,9 +56,9 @@ stdenv.mkDerivation rec {
# SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) # SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
# #
# Please try revert the change that introduced this comment when updating SDL. # Please try revert the change that introduced this comment when updating SDL.
] ++ optional stdenv.isDarwin "--disable-x11-shared" ] ++ lib.optional stdenv.isDarwin "--disable-x11-shared"
++ optional (!x11Support) "--without-x" ++ lib.optional (!x11Support) "--without-x"
++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"; ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib";
patches = [ patches = [
./find-headers.patch ./find-headers.patch

View file

@ -55,8 +55,6 @@
# NOTE: When editing this expression see if the same change applies to # NOTE: When editing this expression see if the same change applies to
# SDL expression too # SDL expression too
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "SDL2"; pname = "SDL2";
version = "2.24.2"; version = "2.24.2";
@ -88,40 +86,40 @@ stdenv.mkDerivation rec {
depsBuildBuild = [ pkg-config ]; depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland wayland-scanner ]; nativeBuildInputs = [ pkg-config ] ++ lib.optionals waylandSupport [ wayland wayland-scanner ];
propagatedBuildInputs = dlopenPropagatedBuildInputs; propagatedBuildInputs = dlopenPropagatedBuildInputs;
dlopenPropagatedBuildInputs = [ ] dlopenPropagatedBuildInputs = [ ]
# Propagated for #include <GLES/gl.h> in SDL_opengles.h. # Propagated for #include <GLES/gl.h> in SDL_opengles.h.
++ optional openglSupport libGL ++ lib.optional openglSupport libGL
# Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h. # Propagated for #include <X11/Xlib.h> and <X11/Xatom.h> in SDL_syswm.h.
++ optionals x11Support [ libX11 xorgproto ]; ++ lib.optionals x11Support [ libX11 xorgproto ];
dlopenBuildInputs = optionals alsaSupport [ alsa-lib audiofile ] dlopenBuildInputs = lib.optionals alsaSupport [ alsa-lib audiofile ]
++ optional dbusSupport dbus ++ lib.optional dbusSupport dbus
++ optional libdecorSupport libdecor ++ lib.optional libdecorSupport libdecor
++ optional pipewireSupport pipewire ++ lib.optional pipewireSupport pipewire
++ optional pulseaudioSupport libpulseaudio ++ lib.optional pulseaudioSupport libpulseaudio
++ optional udevSupport udev ++ lib.optional udevSupport udev
++ optionals waylandSupport [ wayland wayland-protocols libxkbcommon ] ++ lib.optionals waylandSupport [ wayland wayland-protocols libxkbcommon ]
++ optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ] ++ lib.optionals x11Support [ libICE libXi libXScrnSaver libXcursor libXinerama libXext libXrandr libXxf86vm ]
++ optionals drmSupport [ libdrm mesa ]; ++ lib.optionals drmSupport [ libdrm mesa ];
buildInputs = [ libiconv ] buildInputs = [ libiconv ]
++ dlopenBuildInputs ++ dlopenBuildInputs
++ optional ibusSupport ibus ++ lib.optional ibusSupport ibus
++ optional fcitxSupport fcitx ++ lib.optional fcitxSupport fcitx
++ optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ]; ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreAudio CoreServices ForceFeedback OpenGL ];
enableParallelBuilding = true; enableParallelBuilding = true;
configureFlags = [ configureFlags = [
"--disable-oss" "--disable-oss"
] ++ optional (!x11Support) "--without-x" ] ++ lib.optional (!x11Support) "--without-x"
++ optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib" ++ lib.optional alsaSupport "--with-alsa-prefix=${alsa-lib.out}/lib"
++ optional stdenv.targetPlatform.isWindows "--disable-video-opengles" ++ lib.optional stdenv.targetPlatform.isWindows "--disable-video-opengles"
++ optional stdenv.isDarwin "--disable-sdltest"; ++ lib.optional stdenv.isDarwin "--disable-sdltest";
# We remove libtool .la files when static libs are requested, # We remove libtool .la files when static libs are requested,
# because they make the builds of downstream libs like `SDL_tff` # because they make the builds of downstream libs like `SDL_tff`
@ -156,9 +154,9 @@ stdenv.mkDerivation rec {
# list the symbols used in this way. # list the symbols used in this way.
postFixup = postFixup =
let let
rpath = makeLibraryPath (dlopenPropagatedBuildInputs ++ dlopenBuildInputs); rpath = lib.makeLibraryPath (dlopenPropagatedBuildInputs ++ dlopenBuildInputs);
in in
optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") '' lib.optionalString (stdenv.hostPlatform.extensions.sharedLibrary == ".so") ''
for lib in $out/lib/*.so* ; do for lib in $out/lib/*.so* ; do
if ! [[ -L "$lib" ]]; then if ! [[ -L "$lib" ]]; then
patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib" patchelf --set-rpath "$(patchelf --print-rpath $lib):${rpath}" "$lib"

View file

@ -10,8 +10,6 @@ assert sslSupport -> openssl != null;
assert bdbSupport -> db != null; assert bdbSupport -> db != null;
assert ldapSupport -> openldap != null; assert ldapSupport -> openldap != null;
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "apr-util"; pname = "apr-util";
version = "1.6.1"; version = "1.6.1";
@ -22,21 +20,21 @@ stdenv.mkDerivation rec {
}; };
patches = [ ./fix-libxcrypt-build.patch ] patches = [ ./fix-libxcrypt-build.patch ]
++ optional stdenv.isFreeBSD ./include-static-dependencies.patch; ++ lib.optional stdenv.isFreeBSD ./include-static-dependencies.patch;
NIX_CFLAGS_LINK = [ "-lcrypt" ]; NIX_CFLAGS_LINK = [ "-lcrypt" ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
outputBin = "dev"; outputBin = "dev";
nativeBuildInputs = [ makeWrapper ] ++ optional stdenv.isFreeBSD autoreconfHook; nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.isFreeBSD autoreconfHook;
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ] configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
++ optional (!stdenv.isCygwin) "--with-crypto" ++ lib.optional (!stdenv.isCygwin) "--with-crypto"
++ optional sslSupport "--with-openssl=${openssl.dev}" ++ lib.optional sslSupport "--with-openssl=${openssl.dev}"
++ optional bdbSupport "--with-berkeley-db=${db.dev}" ++ lib.optional bdbSupport "--with-berkeley-db=${db.dev}"
++ optional ldapSupport "--with-ldap=ldap" ++ lib.optional ldapSupport "--with-ldap=ldap"
++ optionals stdenv.isCygwin ++ lib.optionals stdenv.isCygwin
[ "--without-pgsql" "--without-sqlite2" "--without-sqlite3" [ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
"--without-freetds" "--without-berkeley-db" "--without-crypto" ] "--without-freetds" "--without-berkeley-db" "--without-crypto" ]
; ;
@ -53,10 +51,10 @@ stdenv.mkDerivation rec {
''; '';
propagatedBuildInputs = [ apr expat libiconv libxcrypt ] propagatedBuildInputs = [ apr expat libiconv libxcrypt ]
++ optional sslSupport openssl ++ lib.optional sslSupport openssl
++ optional bdbSupport db ++ lib.optional bdbSupport db
++ optional ldapSupport openldap ++ lib.optional ldapSupport openldap
++ optional stdenv.isFreeBSD cyrus_sasl; ++ lib.optional stdenv.isFreeBSD cyrus_sasl;
postInstall = '' postInstall = ''
for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do

View file

@ -2,8 +2,6 @@
, version, sha256, ... , version, sha256, ...
}: }:
with lib;
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "asio"; pname = "asio";
inherit version; inherit version;
@ -17,7 +15,7 @@ stdenv.mkDerivation {
buildInputs = [ openssl ]; buildInputs = [ openssl ];
meta = { meta = with lib; {
homepage = "http://asio.sourceforge.net/"; homepage = "http://asio.sourceforge.net/";
description = "Cross-platform C++ library for network and low-level I/O programming"; description = "Cross-platform C++ library for network and low-level I/O programming";
license = licenses.boost; license = licenses.boost;

View file

@ -1,7 +1,5 @@
{lib, stdenv, fetchurl, aspell, which, writeScript}: {lib, stdenv, fetchurl, aspell, which, writeScript}:
with lib;
/* HOWTO: /* HOWTO:
* Add some of these to your profile or systemPackages. * Add some of these to your profile or systemPackages.
@ -105,7 +103,7 @@ let
homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html"; homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html";
} // (args.meta or {}); } // (args.meta or {});
} // lib.optionalAttrs (stdenv.isDarwin && elem language [ "is" "nb" ]) { } // lib.optionalAttrs (stdenv.isDarwin && lib.elem language [ "is" "nb" ]) {
# tar: Cannot open: Illegal byte sequence # tar: Cannot open: Illegal byte sequence
unpackPhase = '' unpackPhase = ''
runHook preUnpack runHook preUnpack
@ -115,7 +113,7 @@ let
runHook postUnpack runHook postUnpack
''; '';
postPatch = getAttr language { postPatch = lib.getAttr language {
is = '' is = ''
cp icelandic.alias íslenska.alias cp icelandic.alias íslenska.alias
sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre
@ -137,7 +135,7 @@ let
preBuild = '' preBuild = ''
# Aspell can't handle multiple data-dirs # Aspell can't handle multiple data-dirs
# Copy everything we might possibly need # Copy everything we might possibly need
${concatMapStringsSep "\n" (p: '' ${lib.concatMapStringsSep "\n" (p: ''
cp -a ${p}/lib/aspell/* . cp -a ${p}/lib/aspell/* .
'') ([ aspell ] ++ langInputs)} '') ([ aspell ] ++ langInputs)}
export ASPELL_CONF="data-dir $(pwd)" export ASPELL_CONF="data-dir $(pwd)"

View file

@ -34,20 +34,19 @@ assert enableNumpy -> enablePython;
# Boost <1.69 can't be built on linux with clang >8, because pth was removed # Boost <1.69 can't be built on linux with clang >8, because pth was removed
assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69"; assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69";
with lib;
let let
variant = concatStringsSep "," variant = lib.concatStringsSep ","
(optional enableRelease "release" ++ (lib.optional enableRelease "release" ++
optional enableDebug "debug"); lib.optional enableDebug "debug");
threading = concatStringsSep "," threading = lib.concatStringsSep ","
(optional enableSingleThreaded "single" ++ (lib.optional enableSingleThreaded "single" ++
optional enableMultiThreaded "multi"); lib.optional enableMultiThreaded "multi");
link = concatStringsSep "," link = lib.concatStringsSep ","
(optional enableShared "shared" ++ (lib.optional enableShared "shared" ++
optional enableStatic "static"); lib.optional enableStatic "static");
runtime-link = if enableShared then "shared" else "static"; runtime-link = if enableShared then "shared" else "static";
@ -61,16 +60,16 @@ let
# [0]: https://github.com/boostorg/build/commit/0ef40cb86728f1cd804830fef89a6d39153ff632 # [0]: https://github.com/boostorg/build/commit/0ef40cb86728f1cd804830fef89a6d39153ff632
# [1]: https://github.com/boostorg/build/commit/316e26ca718afc65d6170029284521392524e4f8 # [1]: https://github.com/boostorg/build/commit/316e26ca718afc65d6170029284521392524e4f8
jobs = jobs =
if versionOlder version "1.58" then if lib.versionOlder version "1.58" then
"$(($NIX_BUILD_CORES<=64 ? $NIX_BUILD_CORES : 64))" "$(($NIX_BUILD_CORES<=64 ? $NIX_BUILD_CORES : 64))"
else if versionOlder version "1.65" then else if lib.versionOlder version "1.65" then
"$(($NIX_BUILD_CORES<=256 ? $NIX_BUILD_CORES : 256))" "$(($NIX_BUILD_CORES<=256 ? $NIX_BUILD_CORES : 256))"
else else
"$NIX_BUILD_CORES"; "$NIX_BUILD_CORES";
needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared); needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared);
b2Args = concatStringsSep " " ([ b2Args = lib.concatStringsSep " " ([
"--includedir=$dev/include" "--includedir=$dev/include"
"--libdir=$out/lib" "--libdir=$out/lib"
"-j${jobs}" "-j${jobs}"
@ -82,12 +81,12 @@ let
"-sEXPAT_LIBPATH=${expat.out}/lib" "-sEXPAT_LIBPATH=${expat.out}/lib"
# TODO: make this unconditional # TODO: make this unconditional
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform || ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
# required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4 # required on mips; see 61d9f201baeef4c4bb91ad8a8f5f89b747e0dfe4
(stdenv.hostPlatform.isMips && versionAtLeast version "1.79")) [ (stdenv.hostPlatform.isMips && lib.versionAtLeast version "1.79")) [
"address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}" "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}"
"architecture=${if stdenv.hostPlatform.isMips64 "architecture=${if stdenv.hostPlatform.isMips64
then if versionOlder version "1.78" then "mips1" else "mips" then if lib.versionOlder version "1.78" then "mips1" else "mips"
else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x" else if stdenv.hostPlatform.parsed.cpu.name == "s390x" then "s390x"
else toString stdenv.hostPlatform.parsed.cpu.family}" else toString stdenv.hostPlatform.parsed.cpu.family}"
"binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}" "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}"
@ -100,13 +99,13 @@ let
else if stdenv.hostPlatform.isMips32 then "o32" else if stdenv.hostPlatform.isMips32 then "o32"
else if stdenv.hostPlatform.isMips64n64 then "n64" else if stdenv.hostPlatform.isMips64n64 then "n64"
else "sysv"}" else "sysv"}"
] ++ optional (link != "static") "runtime-link=${runtime-link}" ] ++ lib.optional (link != "static") "runtime-link=${runtime-link}"
++ optional (variant == "release") "debug-symbols=off" ++ lib.optional (variant == "release") "debug-symbols=off"
++ optional (toolset != null) "toolset=${toolset}" ++ lib.optional (toolset != null) "toolset=${toolset}"
++ optional (!enablePython) "--without-python" ++ lib.optional (!enablePython) "--without-python"
++ optional needUserConfig "--user-config=user-config.jam" ++ lib.optional needUserConfig "--user-config=user-config.jam"
++ optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off" ++ lib.optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off"
++ optionals (stdenv.hostPlatform.libc == "msvcrt") [ ++ lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"threadapi=win32" "threadapi=win32"
] ++ extraB2Args ] ++ extraB2Args
); );
@ -121,38 +120,38 @@ stdenv.mkDerivation {
patchFlags = []; patchFlags = [];
patches = patches patches = patches
++ optional stdenv.isDarwin ./darwin-no-system-python.patch ++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
# Fix boost-context segmentation faults on ppc64 due to ABI violation # Fix boost-context segmentation faults on ppc64 due to ABI violation
++ optional (versionAtLeast version "1.61" && ++ lib.optional (lib.versionAtLeast version "1.61" &&
versionOlder version "1.71") (fetchpatch { lib.versionOlder version "1.71") (fetchpatch {
url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch"; url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29"; sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
stripLen = 1; stripLen = 1;
extraPrefix = "libs/context/"; extraPrefix = "libs/context/";
}) })
# Fix compiler warning with GCC >= 8; TODO: patch may apply to older versions # Fix compiler warning with GCC >= 8; TODO: patch may apply to older versions
++ optional (versionAtLeast version "1.65" && versionOlder version "1.67") ++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.67")
(fetchpatch { (fetchpatch {
url = "https://github.com/boostorg/mpl/commit/f48fd09d021db9a28bd7b8452c175897e1af4485.patch"; url = "https://github.com/boostorg/mpl/commit/f48fd09d021db9a28bd7b8452c175897e1af4485.patch";
sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0"; sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0";
stripLen = 1; stripLen = 1;
}) })
++ optional (versionAtLeast version "1.65" && versionOlder version "1.70") (fetchpatch { ++ lib.optional (lib.versionAtLeast version "1.65" && lib.versionOlder version "1.70") (fetchpatch {
# support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly # support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly
url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch"; url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch";
sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI="; sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI=";
stripLen = 1; stripLen = 1;
extraPrefix = "libs/context/"; extraPrefix = "libs/context/";
}) })
++ optional (versionAtLeast version "1.70" && versionOlder version "1.73") ./cmake-paths.patch ++ lib.optional (lib.versionAtLeast version "1.70" && lib.versionOlder version "1.73") ./cmake-paths.patch
++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch ++ lib.optional (lib.versionAtLeast version "1.73") ./cmake-paths-173.patch
++ optional (version == "1.77.0") (fetchpatch { ++ lib.optional (version == "1.77.0") (fetchpatch {
url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
relative = "include"; relative = "include";
sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4="; sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
}); });
meta = { meta = with lib; {
homepage = "http://boost.org/"; homepage = "http://boost.org/";
description = "Collection of C++ libraries"; description = "Collection of C++ libraries";
license = licenses.boost; license = licenses.boost;
@ -175,7 +174,7 @@ stdenv.mkDerivation {
inherit boostBuildPatches; inherit boostBuildPatches;
}; };
preConfigure = optionalString useMpi '' preConfigure = lib.optionalString useMpi ''
cat << EOF >> user-config.jam cat << EOF >> user-config.jam
using mpi : ${mpi}/bin/mpiCC ; using mpi : ${mpi}/bin/mpiCC ;
EOF EOF
@ -183,7 +182,7 @@ stdenv.mkDerivation {
# On darwin we need to add the `$out/lib` to the libraries' rpath explicitly, # On darwin we need to add the `$out/lib` to the libraries' rpath explicitly,
# otherwise the dynamic linker is unable to resolve the reference to @rpath # otherwise the dynamic linker is unable to resolve the reference to @rpath
# when the boost libraries want to load each other at runtime. # when the boost libraries want to load each other at runtime.
+ optionalString (stdenv.isDarwin && enableShared) '' + lib.optionalString (stdenv.isDarwin && enableShared) ''
cat << EOF >> user-config.jam cat << EOF >> user-config.jam
using clang-darwin : : ${stdenv.cc.targetPrefix}c++ using clang-darwin : : ${stdenv.cc.targetPrefix}c++
: <linkflags>"-rpath $out/lib/" : <linkflags>"-rpath $out/lib/"
@ -196,7 +195,7 @@ stdenv.mkDerivation {
# uniform way for clang and gcc (which works thanks to our cc-wrapper). # uniform way for clang and gcc (which works thanks to our cc-wrapper).
# We pass toolset later which will make b2 invoke everything in the right # We pass toolset later which will make b2 invoke everything in the right
# way -- the other toolset in user-config.jam will be ignored. # way -- the other toolset in user-config.jam will be ignored.
+ optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cat << EOF >> user-config.jam cat << EOF >> user-config.jam
using gcc : cross : ${stdenv.cc.targetPrefix}c++ using gcc : cross : ${stdenv.cc.targetPrefix}c++
: <archiver>$AR : <archiver>$AR
@ -210,7 +209,7 @@ stdenv.mkDerivation {
EOF EOF
'' ''
# b2 needs to be explicitly told how to find Python when cross-compiling # b2 needs to be explicitly told how to find Python when cross-compiling
+ optionalString enablePython '' + lib.optionalString enablePython ''
cat << EOF >> user-config.jam cat << EOF >> user-config.jam
using python : : ${python.interpreter} using python : : ${python.interpreter}
: ${python}/include/python${python.pythonVersion} : ${python}/include/python${python.pythonVersion}
@ -225,11 +224,11 @@ stdenv.mkDerivation {
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ which boost-build ] nativeBuildInputs = [ which boost-build ]
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ expat zlib bzip2 libiconv ] buildInputs = [ expat zlib bzip2 libiconv ]
++ optional enableIcu icu ++ lib.optional enableIcu icu
++ optionals enablePython [ libxcrypt python ] ++ lib.optionals enablePython [ libxcrypt python ]
++ optional enableNumpy python.pkgs.numpy; ++ lib.optional enableNumpy python.pkgs.numpy;
configureScript = "./bootstrap.sh"; configureScript = "./bootstrap.sh";
configurePlatforms = []; configurePlatforms = [];
@ -239,7 +238,7 @@ stdenv.mkDerivation {
"--includedir=$(dev)/include" "--includedir=$(dev)/include"
"--libdir=$(out)/lib" "--libdir=$(out)/lib"
"--with-bjam=b2" # prevent bootstrapping b2 in configurePhase "--with-bjam=b2" # prevent bootstrapping b2 in configurePhase
] ++ optional (toolset != null) "--with-toolset=${toolset}" ] ++ lib.optional (toolset != null) "--with-toolset=${toolset}"
++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ]; ++ [ (if enableIcu then "--with-icu=${icu.dev}" else "--without-icu") ];
buildPhase = '' buildPhase = ''
@ -265,7 +264,7 @@ stdenv.mkDerivation {
# Make boost header paths relative so that they are not runtime dependencies # Make boost header paths relative so that they are not runtime dependencies
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \; -exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \;
'' + optionalString (stdenv.hostPlatform.libc == "msvcrt") '' '' + lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
$RANLIB "$out/lib/"*.a $RANLIB "$out/lib/"*.a
''; '';

View file

@ -1,13 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake }: { lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cmark-gfm"; pname = "cmark-gfm";
version = "0.29.0.gfm.6"; version = "0.29.0.gfm.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "github"; owner = "github";
repo = "cmark-gfm"; repo = "cmark-gfm";
rev = version; rev = version;
sha256 = "sha256-ekHY5EGSrJrQwlXNjKpyj7k0Bzq1dYPacRsfNZ8K+lk="; sha256 = "sha256-i+y1VORza6pn8a/AfbBKpov/n0ChR9++RC7E8P9p3MY=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View file

@ -2,7 +2,6 @@
, pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false , pam, libxcrypt, fixDarwinDylibNames, autoreconfHook, enableLdap ? false
, buildPackages, pruneLibtoolFiles, nixosTests }: , buildPackages, pruneLibtoolFiles, nixosTests }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cyrus-sasl"; pname = "cyrus-sasl";
version = "2.1.28"; version = "2.1.28";
@ -50,7 +49,7 @@ stdenv.mkDerivation rec {
inherit (nixosTests) parsedmarc postfix; inherit (nixosTests) parsedmarc postfix;
}; };
meta = { meta = with lib; {
homepage = "https://www.cyrusimap.org/sasl"; homepage = "https://www.cyrusimap.org/sasl";
description = "Library for adding authentication support to connection-based protocols"; description = "Library for adding authentication support to connection-based protocols";
platforms = platforms.unix; platforms = platforms.unix;

View file

@ -5,7 +5,6 @@
assert mp4v2Support -> (mp4v2 != null); assert mp4v2Support -> (mp4v2 != null);
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "faac"; pname = "faac";
version = "1.30"; version = "1.30";
@ -16,19 +15,19 @@ stdenv.mkDerivation rec {
}; };
configureFlags = [ ] configureFlags = [ ]
++ optional mp4v2Support "--with-external-mp4v2" ++ lib.optional mp4v2Support "--with-external-mp4v2"
++ optional drmSupport "--enable-drm"; ++ lib.optional drmSupport "--enable-drm";
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ ] buildInputs = [ ]
++ optional mp4v2Support mp4v2; ++ lib.optional mp4v2Support mp4v2;
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = with lib; {
description = "Open source MPEG-4 and MPEG-2 AAC encoder"; description = "Open source MPEG-4 and MPEG-2 AAC encoder";
license = licenses.unfreeRedistributable; license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ codyopel ]; maintainers = with maintainers; [ codyopel ];

View file

@ -11,7 +11,6 @@
, vlc , vlc
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "faad2"; pname = "faad2";
version = "2.10.1"; version = "2.10.1";
@ -24,7 +23,7 @@ stdenv.mkDerivation rec {
}; };
configureFlags = [] configureFlags = []
++ optional drmSupport "--with-drm"; ++ lib.optional drmSupport "--with-drm";
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
@ -34,7 +33,7 @@ stdenv.mkDerivation rec {
ocaml-faad = ocamlPackages.faad; ocaml-faad = ocamlPackages.faad;
}; };
meta = { meta = with lib; {
description = "An open source MPEG-4 and MPEG-2 AAC decoder"; description = "An open source MPEG-4 and MPEG-2 AAC decoder";
homepage = "https://sourceforge.net/projects/faac/"; homepage = "https://sourceforge.net/projects/faac/";
license = licenses.gpl2Plus; license = licenses.gpl2Plus;

View file

@ -14,9 +14,7 @@
, withDoc ? stdenv.cc.isGNU , withDoc ? stdenv.cc.isGNU
}: }:
with lib; assert lib.elem precision [ "single" "double" "long-double" "quad-precision" ];
assert elem precision [ "single" "double" "long-double" "quad-precision" ];
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "fftw-${precision}"; pname = "fftw-${precision}";
@ -31,32 +29,32 @@ stdenv.mkDerivation rec {
}; };
outputs = [ "out" "dev" "man" ] outputs = [ "out" "dev" "man" ]
++ optional withDoc "info"; # it's dev-doc only ++ lib.optional withDoc "info"; # it's dev-doc only
outputBin = "dev"; # fftw-wisdom outputBin = "dev"; # fftw-wisdom
nativeBuildInputs = [ gfortran ]; nativeBuildInputs = [ gfortran ];
buildInputs = optionals stdenv.cc.isClang [ buildInputs = lib.optionals stdenv.cc.isClang [
# TODO: This may mismatch the LLVM version sin the stdenv, see #79818. # TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
llvmPackages.openmp llvmPackages.openmp
] ++ optional enableMpi mpi; ] ++ lib.optional enableMpi mpi;
configureFlags = configureFlags =
[ "--enable-shared" [ "--enable-shared"
"--enable-threads" "--enable-threads"
] ]
++ optional (precision != "double") "--enable-${precision}" ++ lib.optional (precision != "double") "--enable-${precision}"
# all x86_64 have sse2 # all x86_64 have sse2
# however, not all float sizes fit # however, not all float sizes fit
++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2" ++ lib.optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
++ optional enableAvx "--enable-avx" ++ lib.optional enableAvx "--enable-avx"
++ optional enableAvx2 "--enable-avx2" ++ lib.optional enableAvx2 "--enable-avx2"
++ optional enableAvx512 "--enable-avx512" ++ lib.optional enableAvx512 "--enable-avx512"
++ optional enableFma "--enable-fma" ++ lib.optional enableFma "--enable-fma"
++ [ "--enable-openmp" ] ++ [ "--enable-openmp" ]
++ optional enableMpi "--enable-mpi" ++ lib.optional enableMpi "--enable-mpi"
# doc generation causes Fortran wrapper generation which hard-codes gcc # doc generation causes Fortran wrapper generation which hard-codes gcc
++ optional (!withDoc) "--disable-doc"; ++ lib.optional (!withDoc) "--disable-doc";
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -15,7 +15,6 @@
, xorgserver , xorgserver
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "geis"; pname = "geis";
@ -48,7 +47,7 @@ stdenv.mkDerivation rec {
gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH") gappsWrapperArgs+=(--set PYTHONPATH "$program_PYTHONPATH")
''; '';
meta = { meta = with lib; {
description = "A library for input gesture recognition"; description = "A library for input gesture recognition";
homepage = "https://launchpad.net/geis"; homepage = "https://launchpad.net/geis";
license = licenses.gpl2; license = licenses.gpl2;

View file

@ -2,8 +2,6 @@
, AGL, OpenGL , AGL, OpenGL
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "glew"; pname = "glew";
version = "1.10.0"; version = "1.10.0";
@ -20,7 +18,7 @@ stdenv.mkDerivation rec {
patchPhase = '' patchPhase = ''
sed -i 's|lib64|lib|' config/Makefile.linux sed -i 's|lib64|lib|' config/Makefile.linux
${optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' ${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile sed -i -e 's/\(INSTALL.*\)-s/\1/' Makefile
''} ''}
''; '';

View file

@ -4,7 +4,6 @@
, idnSupport ? true, libidn , idnSupport ? true, libidn
}: }:
with lib;
stdenv.mkDerivation rec{ stdenv.mkDerivation rec{
pname = "gloox"; pname = "gloox";
@ -16,11 +15,11 @@ stdenv.mkDerivation rec{
}; };
buildInputs = [ ] buildInputs = [ ]
++ optional zlibSupport zlib ++ lib.optional zlibSupport zlib
++ optional sslSupport openssl ++ lib.optional sslSupport openssl
++ optional idnSupport libidn; ++ lib.optional idnSupport libidn;
meta = { meta = with lib; {
description = "A portable high-level Jabber/XMPP library for C++"; description = "A portable high-level Jabber/XMPP library for C++";
homepage = "http://camaya.net/gloox"; homepage = "http://camaya.net/gloox";
license = licenses.gpl3; license = licenses.gpl3;

View file

@ -7,8 +7,6 @@
, fetchpatch, buildPackages , fetchpatch, buildPackages
}: }:
with lib;
let let
gtkCleanImmodulesCache = substituteAll { gtkCleanImmodulesCache = substituteAll {
@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
./patches/2.0-immodules.cache.patch ./patches/2.0-immodules.cache.patch
./patches/gtk2-theme-paths.patch ./patches/gtk2-theme-paths.patch
] ++ optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
(fetchpatch { (fetchpatch {
url = "https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776"; url = "https://bug557780.bugzilla-attachments.gnome.org/attachment.cgi?id=306776";
sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r"; sha256 = "0sp8f1r5c4j2nlnbqgv7s7nxa4cfwigvm033hvhb1ld652pjag4r";
@ -54,13 +52,13 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = with xorg; propagatedBuildInputs = with xorg;
[ glib cairo pango gdk-pixbuf atk ] [ glib cairo pango gdk-pixbuf atk ]
++ optionals (stdenv.isLinux || stdenv.isDarwin) [ ++ lib.optionals (stdenv.isLinux || stdenv.isDarwin) [
libXrandr libXrender libXcomposite libXi libXcursor libXrandr libXrender libXcomposite libXi libXcursor
] ]
++ optionals stdenv.isDarwin [ libXdamage ] ++ lib.optionals stdenv.isDarwin [ libXdamage ]
++ optional xineramaSupport libXinerama ++ lib.optional xineramaSupport libXinerama
++ optionals cupsSupport [ cups ] ++ lib.optionals cupsSupport [ cups ]
++ optionals stdenv.isDarwin [ AppKit Cocoa ]; ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa ];
preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
MACOSX_DEPLOYMENT_TARGET=10.16 MACOSX_DEPLOYMENT_TARGET=10.16
@ -69,7 +67,7 @@ stdenv.mkDerivation rec {
configureFlags = [ configureFlags = [
"--with-gdktarget=${gdktarget}" "--with-gdktarget=${gdktarget}"
"--with-xinput=yes" "--with-xinput=yes"
] ++ optionals stdenv.isDarwin [ ] ++ lib.optionals stdenv.isDarwin [
"--disable-glibtest" "--disable-glibtest"
"--disable-introspection" "--disable-introspection"
"--disable-visibility" "--disable-visibility"
@ -94,7 +92,7 @@ stdenv.mkDerivation rec {
inherit gdktarget; inherit gdktarget;
}; };
meta = { meta = with lib; {
description = "A multi-platform toolkit for creating graphical user interfaces"; description = "A multi-platform toolkit for creating graphical user interfaces";
homepage = "https://www.gtk.org/"; homepage = "https://www.gtk.org/";
license = licenses.lgpl2Plus; license = licenses.lgpl2Plus;

View file

@ -1,10 +1,9 @@
{ stdenv, lib, hunspell, makeWrapper, dicts ? [] }: { stdenv, lib, hunspell, makeWrapper, dicts ? [] }:
with lib;
let let
searchPath = makeSearchPath "share/hunspell" dicts; searchPath = lib.makeSearchPath "share/hunspell" dicts;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = (appendToName "with-dicts" hunspell).name; name = (lib.appendToName "with-dicts" hunspell).name;
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildCommand = '' buildCommand = ''
makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath} makeWrapper ${hunspell.bin}/bin/hunspell $out/bin/hunspell --prefix DICPATH : ${lib.escapeShellArg searchPath}

View file

@ -3,8 +3,6 @@
, glib, dbus-glib, json-glib , glib, dbus-glib, json-glib
, gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }: , gtk2, libindicator-gtk2, libdbusmenu-gtk2, libappindicator-gtk2 }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "indicator-application-gtk2"; pname = "indicator-application-gtk2";
version = "12.10.0.1"; version = "12.10.0.1";
@ -45,7 +43,7 @@ stdenv.mkDerivation rec {
"localstatedir=\${TMPDIR}" "localstatedir=\${TMPDIR}"
]; ];
meta = { meta = with lib; {
description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)"; description = "Indicator to take menus from applications and place them in the panel (GTK 2 library for Xfce/LXDE)";
homepage = "https://launchpad.net/indicators-gtk2"; homepage = "https://launchpad.net/indicators-gtk2";
license = licenses.gpl3; license = licenses.gpl3;

View file

@ -4,7 +4,6 @@
, CoreFoundation, Security, SystemConfiguration , CoreFoundation, Security, SystemConfiguration
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "heimdal"; pname = "heimdal";
version = "7.8.0"; version = "7.8.0";
@ -22,9 +21,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkg-config python3 perl bison flex texinfo ] nativeBuildInputs = [ autoreconfHook pkg-config python3 perl bison flex texinfo ]
++ (with perlPackages; [ JSON ]); ++ (with perlPackages; [ JSON ]);
buildInputs = optionals (stdenv.isLinux) [ libcap_ng ] buildInputs = lib.optionals (stdenv.isLinux) [ libcap_ng ]
++ [ db sqlite openssl libedit openldap pam] ++ [ db sqlite openssl libedit openldap pam]
++ optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ]; ++ lib.optionals (stdenv.isDarwin) [ CoreFoundation Security SystemConfiguration ];
## ugly, X should be made an option ## ugly, X should be made an option
configureFlags = [ configureFlags = [
@ -42,7 +41,7 @@ stdenv.mkDerivation rec {
"--with-berkeley-db" "--with-berkeley-db"
"--with-berkeley-db-include=${db.dev}/include" "--with-berkeley-db-include=${db.dev}/include"
"--with-openldap=${openldap.dev}" "--with-openldap=${openldap.dev}"
] ++ optionals (stdenv.isLinux) [ ] ++ lib.optionals (stdenv.isLinux) [
"--with-capng" "--with-capng"
]; ];
@ -91,7 +90,7 @@ stdenv.mkDerivation rec {
# hx_locl.h:67:25: fatal error: pkcs10_asn1.h: No such file or directory # hx_locl.h:67:25: fatal error: pkcs10_asn1.h: No such file or directory
#enableParallelBuilding = true; #enableParallelBuilding = true;
meta = { meta = with lib; {
description = "An implementation of Kerberos 5 (and some more stuff)"; description = "An implementation of Kerberos 5 (and some more stuff)";
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.unix; platforms = platforms.unix;

View file

@ -11,7 +11,6 @@
, debugSupport ? false # Debugging (disables optimizations) , debugSupport ? false # Debugging (disables optimizations)
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lame"; pname = "lame";
version = "3.100"; version = "3.100";
@ -25,24 +24,24 @@ stdenv.mkDerivation rec {
outputMan = "out"; outputMan = "out";
nativeBuildInputs = [ ] nativeBuildInputs = [ ]
++ optional nasmSupport nasm; ++ lib.optional nasmSupport nasm;
buildInputs = [ ] buildInputs = [ ]
#++ optional efenceSupport libefence #++ optional efenceSupport libefence
#++ optional mp3xSupport gtk1 #++ optional mp3xSupport gtk1
++ optional sndfileFileIOSupport libsndfile; ++ lib.optional sndfileFileIOSupport libsndfile;
configureFlags = [ configureFlags = [
(enableFeature nasmSupport "nasm") (lib.enableFeature nasmSupport "nasm")
(enableFeature cpmlSupport "cpml") (lib.enableFeature cpmlSupport "cpml")
#(enableFeature efenceSupport "efence") #(enableFeature efenceSupport "efence")
(if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame") (if sndfileFileIOSupport then "--with-fileio=sndfile" else "--with-fileio=lame")
(enableFeature analyzerHooksSupport "analyzer-hooks") (lib.enableFeature analyzerHooksSupport "analyzer-hooks")
(enableFeature decoderSupport "decoder") (lib.enableFeature decoderSupport "decoder")
(enableFeature frontendSupport "frontend") (lib.enableFeature frontendSupport "frontend")
(enableFeature frontendSupport "dynamic-frontends") (lib.enableFeature frontendSupport "dynamic-frontends")
#(enableFeature mp3xSupport "mp3x") #(enableFeature mp3xSupport "mp3x")
(enableFeature mp3rtpSupport "mp3rtp") (lib.enableFeature mp3rtpSupport "mp3rtp")
(if debugSupport then "--enable-debug=alot" else "") (if debugSupport then "--enable-debug=alot" else "")
]; ];
@ -52,7 +51,7 @@ stdenv.mkDerivation rec {
sed -i '/lame_init_old/d' include/libmp3lame.sym sed -i '/lame_init_old/d' include/libmp3lame.sym
''; '';
meta = { meta = with lib; {
description = "A high quality MPEG Audio Layer III (MP3) encoder"; description = "A high quality MPEG Audio Layer III (MP3) encoder";
homepage = "http://lame.sourceforge.net"; homepage = "http://lame.sourceforge.net";
license = licenses.lgpl2; license = licenses.lgpl2;

View file

@ -8,7 +8,6 @@
assert fontconfigSupport -> fontconfig != null; assert fontconfigSupport -> fontconfig != null;
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libass"; pname = "libass";
version = "0.16.0"; version = "0.16.0";
@ -19,18 +18,18 @@ stdenv.mkDerivation rec {
}; };
configureFlags = [ configureFlags = [
(enableFeature fontconfigSupport "fontconfig") (lib.enableFeature fontconfigSupport "fontconfig")
(enableFeature rasterizerSupport "rasterizer") (lib.enableFeature rasterizerSupport "rasterizer")
(enableFeature largeTilesSupport "large-tiles") (lib.enableFeature largeTilesSupport "large-tiles")
]; ];
nativeBuildInputs = [ pkg-config yasm ]; nativeBuildInputs = [ pkg-config yasm ];
buildInputs = [ freetype fribidi harfbuzz ] buildInputs = [ freetype fribidi harfbuzz ]
++ optional fontconfigSupport fontconfig ++ lib.optional fontconfigSupport fontconfig
++ optional stdenv.isDarwin libiconv; ++ lib.optional stdenv.isDarwin libiconv;
meta = { meta = with lib; {
description = "Portable ASS/SSA subtitle renderer"; description = "Portable ASS/SSA subtitle renderer";
homepage = "https://github.com/libass/libass"; homepage = "https://github.com/libass/libass";
license = licenses.isc; license = licenses.isc;

View file

@ -1,5 +1,4 @@
{ lib, collectd }: { lib, collectd }:
with lib;
collectd.overrideAttrs (oldAttrs: { collectd.overrideAttrs (oldAttrs: {
pname = "libcollectdclient"; pname = "libcollectdclient";

View file

@ -5,8 +5,6 @@
# cgit) that are needed here should be included directly in Nixpkgs as # cgit) that are needed here should be included directly in Nixpkgs as
# files. # files.
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libidn2"; pname = "libidn2";
version = "2.3.2"; version = "2.3.2";
@ -20,14 +18,14 @@ stdenv.mkDerivation rec {
# Beware: non-bootstrap libidn2 is overridden by ./hack.nix # Beware: non-bootstrap libidn2 is overridden by ./hack.nix
outputs = [ "bin" "dev" "out" "info" "devdoc" ]; outputs = [ "bin" "dev" "out" "info" "devdoc" ];
patches = optional stdenv.isDarwin ./fix-error-darwin.patch; patches = lib.optional stdenv.isDarwin ./fix-error-darwin.patch;
enableParallelBuilding = true; enableParallelBuilding = true;
# The above patch causes the documentation to be regenerated, so the # The above patch causes the documentation to be regenerated, so the
# documentation tools are required. # documentation tools are required.
nativeBuildInputs = optionals stdenv.isDarwin [ help2man texinfo ]; nativeBuildInputs = lib.optionals stdenv.isDarwin [ help2man texinfo ];
buildInputs = [ libunistring ] ++ optional stdenv.isDarwin libiconv; buildInputs = [ libunistring ] ++ lib.optional stdenv.isDarwin libiconv;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
meta = { meta = {

View file

@ -15,21 +15,21 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libkrun"; pname = "libkrun";
version = "1.4.8"; version = "1.5.0";
src = if stdenv.isLinux then fetchFromGitHub { src = if stdenv.isLinux then fetchFromGitHub {
owner = "containers"; owner = "containers";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-3oNsY91hgor1nZV10mcEZyEdhmHlozF8xXaCR4dvLYg="; hash = "sha256-3WYxGpZ3uRbnh/VEDVSNOxp25SE7GQgC5t3ROuKNRE0=";
} else fetchurl { } else fetchurl {
url = "https://github.com/containers/libkrun/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz"; url = "https://github.com/containers/libkrun/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz";
hash = "sha256-eKjBUianpW4T8OeVwRSEyZFfDE10d3qogkPA4FUJ7rc="; hash = "sha256-T1nYzrzxEJaVBnI00CQPKoT2OYJxdW7y6WNkabNsQYI=";
}; };
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
inherit src; inherit src;
hash = "sha256-9v8UaBBpQDPZwHVurFJ1FaFMe6wywH3upKDjGcPYnuQ="; hash = "sha256-Clb6PNwLuzx42Qr1tgpjG1WHq9NcDr2bbfnyp4UVVLU=";
}; };
nativeBuildInputs = with rustPlatform; [ nativeBuildInputs = with rustPlatform; [
@ -61,5 +61,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/containers/libkrun"; homepage = "https://github.com/containers/libkrun";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ nickcao ]; maintainers = with maintainers; [ nickcao ];
platforms = libkrunfw.meta.platforms;
sourceProvenance = with sourceTypes; lib.optionals stdenv.isDarwin [ binaryNativeCode ];
}; };
} }

View file

@ -13,21 +13,21 @@
assert sevVariant -> stdenv.isx86_64; assert sevVariant -> stdenv.isx86_64;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libkrunfw"; pname = "libkrunfw";
version = "3.8.1"; version = "3.9.0";
src = if stdenv.isLinux then fetchFromGitHub { src = if stdenv.isLinux then fetchFromGitHub {
owner = "containers"; owner = "containers";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-6jFIfTPjI6Eq0SFdQVxqqoBDW00AsDz/xHN+n6DezME="; hash = "sha256-hpVE7g6V3nquZ3R5fQCcfRWuFDHJ3rgisezwdsDMaGg=";
} else fetchurl { } else fetchurl {
url = "https://github.com/containers/libkrunfw/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz"; url = "https://github.com/containers/libkrunfw/releases/download/v${version}/v${version}-with_macos_prebuilts.tar.gz";
hash = "sha256-i7btjGBgb93tHshIS02Rp492iB4aG0N4UuRwv6Pkukg="; hash = "sha256-moZ2LYLhZDb8Y8jgWbdgK6SbJ8lY8f356d5vKHc/54Q=";
}; };
kernelSrc = fetchurl { kernelSrc = fetchurl {
url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.0.6.tar.xz"; url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.6.tar.xz";
hash = "sha256-hksFry2Gm6c9YanFlZ5FMaFBqyvXshdINnH2Jfl0f6o="; hash = "sha256-Pk2OVh2lcDogWujXsr7WxcZPxCme68v9IEgeY7V9XuM=";
}; };
preBuild = '' preBuild = ''
@ -54,5 +54,6 @@ stdenv.mkDerivation rec {
license = with licenses; [ lgpl2Only lgpl21Only ]; license = with licenses; [ lgpl2Only lgpl21Only ];
maintainers = with maintainers; [ nickcao ]; maintainers = with maintainers; [ nickcao ];
platforms = [ "x86_64-linux" "aarch64-darwin" ]; platforms = [ "x86_64-linux" "aarch64-darwin" ];
sourceProvenance = with sourceTypes; lib.optionals stdenv.isDarwin [ binaryNativeCode ];
}; };
} }

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }: { lib, stdenv, fetchurl, darwin, disablePosixThreads ? false }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libmcrypt"; pname = "libmcrypt";
version = "2.5.8"; version = "2.5.8";
@ -11,15 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"; sha256 = "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4";
}; };
buildInputs = optional stdenv.isDarwin darwin.cctools; buildInputs = lib.optional stdenv.isDarwin darwin.cctools;
configureFlags = optionals disablePosixThreads configureFlags = lib.optionals disablePosixThreads
[ "--disable-posix-threads" ]; [ "--disable-posix-threads" ];
meta = { meta = {
description = "Replacement for the old crypt() package and crypt(1) command, with extensions"; description = "Replacement for the old crypt() package and crypt(1) command, with extensions";
homepage = "http://mcrypt.sourceforge.net"; homepage = "http://mcrypt.sourceforge.net";
license = "GPL"; license = "GPL";
platforms = platforms.all; platforms = lib.platforms.all;
}; };
} }

View file

@ -17,8 +17,6 @@
, libva , libva
}: }:
with lib;
mkDerivation rec { mkDerivation rec {
pname = "libqtav"; pname = "libqtav";
version = "unstable-2020-09-10"; version = "unstable-2020-09-10";
@ -64,7 +62,7 @@ mkDerivation rec {
stripDebugList = [ "lib" "libexec" "bin" "qml" ]; stripDebugList = [ "lib" "libexec" "bin" "qml" ];
meta = { meta = with lib; {
description = "A multimedia playback framework based on Qt + FFmpeg"; description = "A multimedia playback framework based on Qt + FFmpeg";
#license = licenses.lgpl21; # For the libraries / headers only. #license = licenses.lgpl21; # For the libraries / headers only.
license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used. license = licenses.gpl3; # With the examples (under bin) and most likely some of the optional dependencies used.

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, fetchpatch }: { lib, stdenv, fetchFromGitHub, autoreconfHook, fetchpatch }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libspf2"; pname = "libspf2";
version = "2.2.12"; version = "2.2.12";
@ -35,7 +33,7 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
meta = { meta = with lib; {
description = "Implementation of the Sender Policy Framework for SMTP " + description = "Implementation of the Sender Policy Framework for SMTP " +
"authorization (Helsinki Systems fork)"; "authorization (Helsinki Systems fork)";
homepage = "https://github.com/helsinki-systems/libspf2"; homepage = "https://github.com/helsinki-systems/libspf2";

View file

@ -1,6 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, cmake, perl }: { lib, stdenv, fetchurl, pkg-config, cmake, perl }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libtap"; pname = "libtap";

View file

@ -3,7 +3,6 @@
, gtk-doc, docbook_xml_dtd_45, docbook_xsl , gtk-doc, docbook_xml_dtd_45, docbook_xsl
, libxslt, libxml2 }: , libxslt, libxml2 }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
majorVer = "3.0"; majorVer = "3.0";
@ -23,8 +22,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://wiki.gnome.org/Attic/LibUnique"; homepage = "https://wiki.gnome.org/Attic/LibUnique";
description = "A library for writing single instance applications"; description = "A library for writing single instance applications";
license = licenses.lgpl21; license = lib.licenses.lgpl21;
maintainers = [ maintainers.AndersonTorres ]; maintainers = [ lib.maintainers.AndersonTorres ];
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View file

@ -1,7 +1,5 @@
{ stdenv, fetchurl, lib, glib }: { stdenv, fetchurl, lib, glib }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libutempter"; pname = "libutempter";
version = "1.2.1"; version = "1.2.1";
@ -28,7 +26,7 @@ stdenv.mkDerivation rec {
"mandir=\${out}/share/man" "mandir=\${out}/share/man"
]; ];
meta = { meta = with lib; {
homepage = "https://github.com/altlinux/libutempter"; homepage = "https://github.com/altlinux/libutempter";
description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files"; description = "Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files";
longDescription = '' longDescription = ''

View file

@ -42,13 +42,13 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libvgm"; pname = "libvgm";
version = "unstable-2022-11-25"; version = "unstable-2023-01-18";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ValleyBell"; owner = "ValleyBell";
repo = "libvgm"; repo = "libvgm";
rev = "fd7da37b96b5937a0bb5a41bacbae0a0ef59069f"; rev = "c250212538dd48d3965826ad7fe669bb0f348cbd";
sha256 = "1tjooO/f72lRdZDxXVSxBySWsUMNWuqI2yQOipa7zFY="; sha256 = "5XHdPtadfsfzkeeOpa5NPrWarHBHeKvmr7p0m31URDc=";
}; };
outputs = [ outputs = [

View file

@ -77,13 +77,11 @@
, zfs , zfs
}: }:
with lib;
let let
inherit (stdenv) isDarwin isLinux isx86_64; inherit (stdenv) isDarwin isLinux isx86_64;
binPath = makeBinPath ([ binPath = lib.makeBinPath ([
dnsmasq dnsmasq
] ++ optionals isLinux [ ] ++ lib.optionals isLinux [
bridge-utils bridge-utils
dmidecode dmidecode
dnsmasq dnsmasq
@ -95,10 +93,10 @@ let
numad numad
pmutils pmutils
systemd systemd
] ++ optionals enableIscsi [ ] ++ lib.optionals enableIscsi [
libiscsi libiscsi
openiscsi openiscsi
] ++ optionals enableZfs [ ] ++ lib.optionals enableZfs [
zfs zfs
]); ]);
in in
@ -148,17 +146,17 @@ stdenv.mkDerivation rec {
substituteInPlace meson.build \ substituteInPlace meson.build \
--replace "'dbus-daemon'," "'${lib.getBin dbus}/bin/dbus-daemon'," --replace "'dbus-daemon'," "'${lib.getBin dbus}/bin/dbus-daemon',"
'' + optionalString isLinux '' '' + lib.optionalString isLinux ''
sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \ sed -i 's,define PARTED "parted",define PARTED "${parted}/bin/parted",' \
src/storage/storage_backend_disk.c \ src/storage/storage_backend_disk.c \
src/storage/storage_util.c src/storage/storage_util.c
'' + optionalString isDarwin '' '' + lib.optionalString isDarwin ''
sed -i '/qemucapabilitiestest/d' tests/meson.build sed -i '/qemucapabilitiestest/d' tests/meson.build
sed -i '/vircryptotest/d' tests/meson.build sed -i '/vircryptotest/d' tests/meson.build
sed -i '/domaincapstest/d' tests/meson.build sed -i '/domaincapstest/d' tests/meson.build
sed -i '/qemufirmwaretest/d' tests/meson.build sed -i '/qemufirmwaretest/d' tests/meson.build
sed -i '/qemuvhostusertest/d' tests/meson.build sed -i '/qemuvhostusertest/d' tests/meson.build
'' + optionalString (isDarwin && isx86_64) '' '' + lib.optionalString (isDarwin && isx86_64) ''
sed -i '/qemucaps2xmltest/d' tests/meson.build sed -i '/qemucaps2xmltest/d' tests/meson.build
sed -i '/qemuhotplugtest/d' tests/meson.build sed -i '/qemuhotplugtest/d' tests/meson.build
sed -i '/virnetdaemontest/d' tests/meson.build sed -i '/virnetdaemontest/d' tests/meson.build
@ -178,9 +176,9 @@ stdenv.mkDerivation rec {
perl perl
perlPackages.XMLXPath perlPackages.XMLXPath
] ]
++ optional (!isDarwin) rpcsvc-proto ++ lib.optional (!isDarwin) rpcsvc-proto
# NOTE: needed for rpcgen # NOTE: needed for rpcgen
++ optional isDarwin darwin.developer_cmds; ++ lib.optional isDarwin darwin.developer_cmds;
buildInputs = [ buildInputs = [
bash bash
@ -197,7 +195,7 @@ stdenv.mkDerivation rec {
readline readline
xhtml1 xhtml1
yajl yajl
] ++ optionals isLinux [ ] ++ lib.optionals isLinux [
acl acl
attr attr
audit audit
@ -213,17 +211,17 @@ stdenv.mkDerivation rec {
parted parted
systemd systemd
util-linux util-linux
] ++ optionals isDarwin [ ] ++ lib.optionals isDarwin [
AppKit AppKit
Carbon Carbon
gmp gmp
libiconv libiconv
] ]
++ optionals enableCeph [ ceph ] ++ lib.optionals enableCeph [ ceph ]
++ optionals enableGlusterfs [ glusterfs ] ++ lib.optionals enableGlusterfs [ glusterfs ]
++ optionals enableIscsi [ libiscsi openiscsi ] ++ lib.optionals enableIscsi [ libiscsi openiscsi ]
++ optionals enableXen [ xen ] ++ lib.optionals enableXen [ xen ]
++ optionals enableZfs [ zfs ]; ++ lib.optionals enableZfs [ zfs ];
preConfigure = preConfigure =
let let
@ -348,7 +346,7 @@ stdenv.mkDerivation rec {
# Added in nixpkgs: # Added in nixpkgs:
gettext() { "${gettext}/bin/gettext" "$@"; } gettext() { "${gettext}/bin/gettext" "$@"; }
' '
'' + optionalString isLinux '' '' + lib.optionalString isLinux ''
for f in $out/lib/systemd/system/*.service ; do for f in $out/lib/systemd/system/*.service ; do
substituteInPlace $f --replace /bin/kill ${coreutils}/bin/kill substituteInPlace $f --replace /bin/kill ${coreutils}/bin/kill
done done
@ -372,7 +370,7 @@ stdenv.mkDerivation rec {
passthru.tests.libvirtd = nixosTests.libvirtd; passthru.tests.libvirtd = nixosTests.libvirtd;
meta = { meta = with lib; {
description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux and other OSes"; description = "A toolkit to interact with the virtualization capabilities of recent versions of Linux and other OSes";
homepage = "https://libvirt.org/"; homepage = "https://libvirt.org/";
changelog = "https://gitlab.com/libvirt/libvirt/-/raw/v${version}/NEWS.rst"; changelog = "https://gitlab.com/libvirt/libvirt/-/raw/v${version}/NEWS.rst";

View file

@ -10,8 +10,6 @@
libvirt, libvirt,
xenSupport ? true }: xenSupport ? true }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libvmi"; pname = "libvmi";
version = "0.12.0"; version = "0.12.0";
@ -24,16 +22,16 @@ stdenv.mkDerivation rec {
sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv"; sha256 = "0wbi2nasb1gbci6cq23g6kq7i10rwi1y7r44rl03icr5prqjpdyv";
}; };
buildInputs = [ glib libvirt json_c ] ++ (optional xenSupport xen); buildInputs = [ glib libvirt json_c ] ++ (lib.optional xenSupport xen);
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ]; nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
configureFlags = optional (!xenSupport) "--disable-xen"; configureFlags = lib.optional (!xenSupport) "--disable-xen";
# libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here # libvmi uses dlopen() for the xen libraries, however autoPatchelfHook doesn't work here
postFixup = optionalString xenSupport '' postFixup = lib.optionalString xenSupport ''
libvmi="$out/lib/libvmi.so.${libVersion}" libvmi="$out/lib/libvmi.so.${libVersion}"
oldrpath=$(patchelf --print-rpath "$libvmi") oldrpath=$(patchelf --print-rpath "$libvmi")
patchelf --set-rpath "$oldrpath:${makeLibraryPath [ xen ]}" "$libvmi" patchelf --set-rpath "$oldrpath:${lib.makeLibraryPath [ xen ]}" "$libvmi"
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,7 +1,5 @@
{ stdenv, lib, fetchFromGitHub, autoreconfHook }: { stdenv, lib, fetchFromGitHub, autoreconfHook }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libytnef"; pname = "libytnef";
version = "2.0"; version = "2.0";
@ -15,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];
meta = { meta = with lib; {
inherit (src.meta) homepage; inherit (src.meta) homepage;
description = "Yeraze's TNEF Stream Reader - for winmail.dat files"; description = "Yeraze's TNEF Stream Reader - for winmail.dat files";
license = licenses.gpl2Plus; license = licenses.gpl2Plus;

View file

@ -36,13 +36,11 @@
- libOSMesa is in $osmesa (~4 MB) - libOSMesa is in $osmesa (~4 MB)
*/ */
with lib;
let let
# Release calendar: https://www.mesa3d.org/release-calendar.html # Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule # Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "22.3.3"; version = "22.3.3";
branch = versions.major version; branch = lib.versions.major version;
withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm; withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm;
@ -115,43 +113,43 @@ self = stdenv.mkDerivation {
"-Ddisk-cache-key=${placeholder "drivers"}" "-Ddisk-cache-key=${placeholder "drivers"}"
"-Ddri-search-path=${libglvnd.driverLink}/lib/dri" "-Ddri-search-path=${libglvnd.driverLink}/lib/dri"
"-Dplatforms=${concatStringsSep "," eglPlatforms}" "-Dplatforms=${lib.concatStringsSep "," eglPlatforms}"
"-Dgallium-drivers=${concatStringsSep "," galliumDrivers}" "-Dgallium-drivers=${lib.concatStringsSep "," galliumDrivers}"
"-Dvulkan-drivers=${concatStringsSep "," vulkanDrivers}" "-Dvulkan-drivers=${lib.concatStringsSep "," vulkanDrivers}"
"-Ddri-drivers-path=${placeholder "drivers"}/lib/dri" "-Ddri-drivers-path=${placeholder "drivers"}/lib/dri"
"-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau" "-Dvdpau-libs-path=${placeholder "drivers"}/lib/vdpau"
"-Domx-libs-path=${placeholder "drivers"}/lib/bellagio" "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio"
"-Dva-libs-path=${placeholder "drivers"}/lib/dri" "-Dva-libs-path=${placeholder "drivers"}/lib/dri"
"-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d" "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d"
"-Dgallium-nine=${boolToString enableGalliumNine}" # Direct3D in Wine "-Dgallium-nine=${lib.boolToString enableGalliumNine}" # Direct3D in Wine
"-Dosmesa=${boolToString enableOSMesa}" # used by wine "-Dosmesa=${lib.boolToString enableOSMesa}" # used by wine
"-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12) "-Dmicrosoft-clc=disabled" # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
# To enable non-mesa gbm backends to be found (e.g. Nvidia) # To enable non-mesa gbm backends to be found (e.g. Nvidia)
"-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm" "-Dgbm-backends-path=${libglvnd.driverLink}/lib/gbm:${placeholder "out"}/lib/gbm"
] ++ optionals stdenv.isLinux [ ] ++ lib.optionals stdenv.isLinux [
"-Dglvnd=true" "-Dglvnd=true"
] ++ optionals enableOpenCL [ ] ++ lib.optionals enableOpenCL [
"-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend "-Dgallium-opencl=icd" # Enable the gallium OpenCL frontend
"-Dgallium-rusticl=true" "-Drust_std=2021" "-Dgallium-rusticl=true" "-Drust_std=2021"
"-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib" "-Dclang-libdir=${llvmPackages.clang-unwrapped.lib}/lib"
] ++ optional enablePatentEncumberedCodecs ] ++ lib.optional enablePatentEncumberedCodecs
"-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec" "-Dvideo-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec"
++ optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}"; ++ lib.optional (vulkanLayers != []) "-D vulkan-layers=${builtins.concatStringsSep "," vulkanLayers}";
buildInputs = with xorg; [ buildInputs = with xorg; [
expat llvmPackages.libllvm libglvnd xorgproto expat llvmPackages.libllvm libglvnd xorgproto
libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr libX11 libXext libxcb libXt libXfixes libxshmfence libXrandr
libffi libvdpau libelf libXvMC libffi libvdpau libelf libXvMC
libpthreadstubs openssl /*or another sha1 provider*/ libpthreadstubs openssl /*or another sha1 provider*/
] ++ lib.optionals (elem "wayland" eglPlatforms) [ wayland wayland-protocols ] ] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [ wayland wayland-protocols ]
++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ] ++ lib.optionals stdenv.isLinux [ libomxil-bellagio libva-minimal ]
++ lib.optionals stdenv.isDarwin [ libunwind ] ++ lib.optionals stdenv.isDarwin [ libunwind ]
++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ] ++ lib.optionals enableOpenCL [ libclc llvmPackages.clang llvmPackages.clang-unwrapped rustc rust-bindgen' spirv-llvm-translator_14 ]
++ lib.optional withValgrind valgrind-light ++ lib.optional withValgrind valgrind-light
# Mesa will not build zink when gallium-drivers=auto # Mesa will not build zink when gallium-drivers=auto
++ lib.optional (elem "zink" galliumDrivers) vulkan-loader; ++ lib.optional (lib.elem "zink" galliumDrivers) vulkan-loader;
depsBuildBuild = [ pkg-config ]; depsBuildBuild = [ pkg-config ];
@ -160,21 +158,21 @@ self = stdenv.mkDerivation {
intltool bison flex file intltool bison flex file
python3Packages.python python3Packages.Mako python3Packages.python python3Packages.Mako
jdupes glslang jdupes glslang
] ++ lib.optionals (elem "wayland" eglPlatforms) [ ] ++ lib.optionals (lib.elem "wayland" eglPlatforms) [
wayland-scanner wayland-scanner
]; ];
propagatedBuildInputs = with xorg; [ propagatedBuildInputs = with xorg; [
libXdamage libXxf86vm libXdamage libXxf86vm
] ++ optional withLibdrm libdrm ] ++ lib.optional withLibdrm libdrm
++ optionals stdenv.isDarwin [ OpenGL Xplugin ]; ++ lib.optionals stdenv.isDarwin [ OpenGL Xplugin ];
doCheck = false; doCheck = false;
postInstall = '' postInstall = ''
# Some installs don't have any drivers so this directory is never created. # Some installs don't have any drivers so this directory is never created.
mkdir -p $drivers $osmesa mkdir -p $drivers $osmesa
'' + optionalString stdenv.isLinux '' '' + lib.optionalString stdenv.isLinux ''
mkdir -p $drivers/lib mkdir -p $drivers/lib
if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then if [ -n "$(shopt -s nullglob; echo "$out/lib/libxatracker"*)" -o -n "$(shopt -s nullglob; echo "$out/lib/libvulkan_"*)" ]; then
@ -199,7 +197,7 @@ self = stdenv.mkDerivation {
for js in $drivers/share/vulkan/icd.d/*.json; do for js in $drivers/share/vulkan/icd.d/*.json; do
substituteInPlace "$js" --replace "$out" "$drivers" substituteInPlace "$js" --replace "$out" "$drivers"
done done
'' + optionalString enableOpenCL '' '' + lib.optionalString enableOpenCL ''
# Move OpenCL stuff # Move OpenCL stuff
mkdir -p $opencl/lib mkdir -p $opencl/lib
mv -t "$opencl/lib/" \ mv -t "$opencl/lib/" \
@ -221,7 +219,7 @@ self = stdenv.mkDerivation {
done done
''; '';
postFixup = optionalString stdenv.isLinux '' postFixup = lib.optionalString stdenv.isLinux ''
# set the default search path for DRI drivers; used e.g. by X server # set the default search path for DRI drivers; used e.g. by X server
substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}" substituteInPlace "$dev/lib/pkgconfig/dri.pc" --replace "$drivers" "${libglvnd.driverLink}"
[ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}" [ -f "$dev/lib/pkgconfig/d3d.pc" ] && substituteInPlace "$dev/lib/pkgconfig/d3d.pc" --replace "$drivers" "${libglvnd.driverLink}"
@ -252,7 +250,7 @@ self = stdenv.mkDerivation {
done done
''; '';
NIX_CFLAGS_COMPILE = optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [ NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [ "-fno-common" ] ++ lib.optionals enableOpenCL [
"-UPIPE_SEARCH_DIR" "-UPIPE_SEARCH_DIR"
"-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\"" "-DPIPE_SEARCH_DIR=\"${placeholder "opencl"}/lib/gallium-pipe\""
]; ];
@ -274,7 +272,7 @@ self = stdenv.mkDerivation {
}; };
}; };
meta = { meta = with lib; {
description = "An open source 3D graphics library"; description = "An open source 3D graphics library";
longDescription = '' longDescription = ''
The Mesa project began as an open-source implementation of the OpenGL The Mesa project began as an open-source implementation of the OpenGL

View file

@ -1,10 +1,10 @@
{ stdenv, lib, nuspell, makeWrapper, dicts ? [] }: { stdenv, lib, nuspell, makeWrapper, dicts ? [] }:
with lib;
let let
searchPath = makeSearchPath "share/hunspell" dicts; searchPath = lib.makeSearchPath "share/hunspell" dicts;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = (appendToName "with-dicts" nuspell).name; name = (lib.appendToName "with-dicts" nuspell).name;
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildCommand = '' buildCommand = ''
makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath} makeWrapper ${nuspell}/bin/nuspell $out/bin/nuspell --prefix DICPATH : ${lib.escapeShellArg searchPath}

View file

@ -3,7 +3,6 @@
OpenCL, Cocoa OpenCL, Cocoa
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "opencascade-oce"; pname = "opencascade-oce";
version = "0.18.3"; version = "0.18.3";
@ -20,7 +19,7 @@ stdenv.mkDerivation rec {
libGL libGLU libXmu freetype fontconfig expat freeimage vtk_8 libGL libGLU libXmu freetype fontconfig expat freeimage vtk_8
gl2ps tbb gl2ps tbb
] ]
++ optionals stdenv.isDarwin [OpenCL Cocoa] ++ lib.optionals stdenv.isDarwin [OpenCL Cocoa]
; ;
cmakeFlags = [ cmakeFlags = [
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
"-DOCE_WITH_GL2PS=ON" "-DOCE_WITH_GL2PS=ON"
"-DOCE_MULTITHREAD_LIBRARY=TBB" "-DOCE_MULTITHREAD_LIBRARY=TBB"
] ]
++ optionals stdenv.isDarwin ["-DOCE_OSX_USE_COCOA=ON" "-DOCE_WITH_OPENCL=ON"]; ++ lib.optionals stdenv.isDarwin ["-DOCE_OSX_USE_COCOA=ON" "-DOCE_WITH_OPENCL=ON"];
patches = [ patches = [
# Use fontconfig instead of hardcoded directory list # Use fontconfig instead of hardcoded directory list
@ -56,7 +55,7 @@ stdenv.mkDerivation rec {
--replace FONTCONFIG_LIBRARIES FONTCONFIG_LINK_LIBRARIES --replace FONTCONFIG_LIBRARIES FONTCONFIG_LINK_LIBRARIES
''; '';
meta = { meta = with lib; {
description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation"; description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
homepage = "https://github.com/tpaviot/oce"; homepage = "https://github.com/tpaviot/oce";
maintainers = [ maintainers.viric ]; maintainers = [ maintainers.viric ];

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchzip }: { lib, stdenv, fetchzip }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.94"; version = "0.94";
pname = "pcg-c"; pname = "pcg-c";
@ -31,8 +29,8 @@ stdenv.mkDerivation rec {
algorithms for random number generation. Unlike many general-purpose RNGs, algorithms for random number generation. Unlike many general-purpose RNGs,
they are also hard to predict. they are also hard to predict.
''; '';
platforms = platforms.unix; platforms = lib.platforms.unix;
maintainers = [ maintainers.linus ]; maintainers = [ lib.maintainers.linus ];
broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11 broken = stdenv.isi686; # https://github.com/imneme/pcg-c/issues/11
}; };
} }

View file

@ -3,9 +3,7 @@
, variant ? null , variant ? null
}: }:
with lib; assert lib.elem variant [ null "cpp" "pcre16" "pcre32" ];
assert elem variant [ null "cpp" "pcre16" "pcre32" ];
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pcre" pname = "pcre"
@ -21,11 +19,11 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "doc" "man" ]; outputs = [ "bin" "dev" "out" "doc" "man" ];
# Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51 # Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
configureFlags = optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [ configureFlags = lib.optional (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit=auto" ++ [
"--enable-unicode-properties" "--enable-unicode-properties"
"--disable-cpp" "--disable-cpp"
] ]
++ optional (variant != null) "--enable-${variant}"; ++ lib.optional (variant != null) "--enable-${variant}";
# https://bugs.exim.org/show_bug.cgi?id=2173 # https://bugs.exim.org/show_bug.cgi?id=2173
patches = [ ./stacksize-detection.patch ]; patches = [ ./stacksize-detection.patch ];
@ -40,7 +38,7 @@ stdenv.mkDerivation rec {
postFixup = '' postFixup = ''
moveToOutput bin/pcre-config "$dev" moveToOutput bin/pcre-config "$dev"
'' + optionalString (variant != null) '' '' + lib.optionalString (variant != null) ''
ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib,*a} ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib,*a}
''; '';
@ -57,7 +55,7 @@ stdenv.mkDerivation rec {
PCRE library is free, even for building proprietary software. PCRE library is free, even for building proprietary software.
''; '';
platforms = platforms.all; platforms = lib.platforms.all;
maintainers = with maintainers; [ ]; maintainers = with lib.maintainers; [ ];
}; };
} }

View file

@ -3,8 +3,6 @@
, debug ? false , debug ? false
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "phonon-backend-gstreamer"; pname = "phonon-backend-gstreamer";
version = "4.10.0"; version = "4.10.0";

View file

@ -12,8 +12,6 @@
, debug ? false , debug ? false
}: }:
with lib;
let let
soname = "phonon4qt5"; soname = "phonon4qt5";
buildsystemdir = "share/cmake/${soname}"; buildsystemdir = "share/cmake/${soname}";

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