0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00

Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-12-18 18:01:22 +00:00 committed by GitHub
commit 9f26e7ee02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 1950 additions and 222 deletions

View file

@ -24,6 +24,7 @@ idris.section.md
ios.section.md
java.section.md
javascript.section.md
julia.section.md
lisp.section.md
lua.section.md
maven.section.md

View file

@ -0,0 +1,69 @@
# Julia {#language-julia}
## Introduction {#julia-introduction}
Nixpkgs includes Julia as the `julia` derivation.
You can get specific versions by looking at the other `julia*` top-level derivations available.
For example, `julia_19` corresponds to Julia 1.9.
We also provide the current stable version as `julia-stable`, and an LTS version as `julia-lts`.
Occasionally, a Julia version has been too difficult to build from source in Nixpkgs and has been fetched prebuilt instead.
These Julia versions are differentiated with the `*-bin` suffix; for example, `julia-stable-bin`.
## julia.withPackages {#julia-withpackage}
The basic Julia derivations only provide the built-in packages that come with the distribution.
You can build Julia environments with additional packages using the `julia.withPackages` command.
This function accepts a list of strings representing Julia package names.
For example, you can build a Julia environment with the `Plots` package as follows.
```nix
julia.withPackages ["Plots"]
```
Arguments can be passed using `.override`.
For example:
```nix
(julia.withPackages.override {
precompile = false; # Turn off precompilation
}) ["Plots"]
```
Here's a nice way to run a Julia environment with a shell one-liner:
```sh
nix-shell -p 'julia.withPackages ["Plots"]' --run julia
```
### Arguments {#julia-withpackage-arguments}
* `precompile`: Whether to run `Pkg.precompile()` on the generated environment.
This will make package imports faster, but may fail in some cases.
For example, there is an upstream issue with `Gtk.jl` that prevents precompilation from working in the Nix build sandbox, because the precompiled code tries to access a display.
Packages like this will work fine if you build with `precompile=false`, and then precompile as needed once your environment starts.
Defaults: `true`
* `extraLibs`: Extra library dependencies that will be placed on the `LD_LIBRARY_PATH` for Julia.
Should not be needed as we try to obtain library dependencies automatically using Julia's artifacts system.
* `makeWrapperArgs`: Extra arguments to pass to the `makeWrapper` call which we use to wrap the Julia binary.
* `setDefaultDepot`: Whether to automatically prepend `$HOME/.julia` to the `JULIA_DEPOT_PATH`.
This is useful because Julia expects a writable depot path as the first entry, which the one we build in Nixpkgs is not.
If there's no writable depot, then Julia will show a warning and be unable to save command history logs etc.
Default: `true`
* `packageOverrides`: Allows you to override packages by name by passing an alternative source.
For example, you can use a custom version of the `LanguageServer` package by passing `packageOverrides = { "LanguageServer" = fetchFromGitHub {...}; }`.
* `augmentedRegistry`: Allows you to change the registry from which Julia packages are drawn.
This normally points at a special augmented version of the Julia [General packages registry](https://github.com/JuliaRegistries/General).
If you want to use a bleeding-edge version to pick up the latest package updates, you can plug in a later revision than the one in Nixpkgs.

View file

@ -14,6 +14,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- This can be disabled through the `environment.stub-ld.enable` option.
- If you use `programs.nix-ld.enable`, no changes are needed. The stub will be disabled automatically.
- Julia environments can now be built with arbitrary packages from the ecosystem using the `.withPackages` function. For example: `julia.withPackages ["Plots"]`.
## New Services {#sec-release-24.05-new-services}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View file

@ -47,7 +47,8 @@ in {
TRUNK_LINK_FAILURE_MODE=0;
NVSWITCH_FAILURE_MODE=0;
ABORT_CUDA_JOBS_ON_FM_EXIT=1;
TOPOLOGY_FILE_PATH=nvidia_x11.fabricmanager + "/share/nvidia-fabricmanager/nvidia/nvswitch";
TOPOLOGY_FILE_PATH="${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
DATABASE_PATH="${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
};
defaultText = lib.literalExpression ''
{
@ -69,7 +70,8 @@ in {
TRUNK_LINK_FAILURE_MODE=0;
NVSWITCH_FAILURE_MODE=0;
ABORT_CUDA_JOBS_ON_FM_EXIT=1;
TOPOLOGY_FILE_PATH=nvidia_x11.fabricmanager + "/share/nvidia-fabricmanager/nvidia/nvswitch";
TOPOLOGY_FILE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
DATABASE_PATH="''${nvidia_x11.fabricmanager}/share/nvidia-fabricmanager/nvidia/nvswitch";
}
'';
description = lib.mdDoc ''
@ -584,24 +586,50 @@ in {
boot.extraModulePackages = [
nvidia_x11.bin
];
systemd.services.nvidia-fabricmanager = {
enable = true;
description = "Start NVIDIA NVLink Management";
wantedBy = [ "multi-user.target" ];
unitConfig.After = [ "network-online.target" ];
unitConfig.Requires = [ "network-online.target" ];
serviceConfig = {
Type = "forking";
TimeoutStartSec = 240;
ExecStart = let
nv-fab-conf = settingsFormat.generate "fabricmanager.conf" cfg.datacenter.settings;
in
nvidia_x11.fabricmanager + "/bin/nv-fabricmanager -c " + nv-fab-conf;
LimitCORE="infinity";
};
};
environment.systemPackages =
lib.optional cfg.datacenter.enable nvidia_x11.fabricmanager;
})
]);
systemd = {
tmpfiles.rules =
lib.optional (nvidia_x11.persistenced != null && config.virtualisation.docker.enableNvidia)
"L+ /run/nvidia-docker/extras/bin/nvidia-persistenced - - - - ${nvidia_x11.persistenced}/origBin/nvidia-persistenced";
services = lib.mkMerge [
({
nvidia-fabricmanager = {
enable = true;
description = "Start NVIDIA NVLink Management";
wantedBy = [ "multi-user.target" ];
unitConfig.After = [ "network-online.target" ];
unitConfig.Requires = [ "network-online.target" ];
serviceConfig = {
Type = "forking";
TimeoutStartSec = 240;
ExecStart = let
nv-fab-conf = settingsFormat.generate "fabricmanager.conf" cfg.datacenter.settings;
in
"${lib.getExe nvidia_x11.fabricmanager} -c ${nv-fab-conf}";
LimitCORE="infinity";
};
};
})
(lib.mkIf cfg.nvidiaPersistenced {
"nvidia-persistenced" = {
description = "NVIDIA Persistence Daemon";
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "forking";
Restart = "always";
PIDFile = "/var/run/nvidia-persistenced/nvidia-persistenced.pid";
ExecStart = "${lib.getExe nvidia_x11.persistenced} --verbose";
ExecStopPost = "${pkgs.coreutils}/bin/rm -rf /var/run/nvidia-persistenced";
};
};
})
];
};
environment.systemPackages =
lib.optional cfg.datacenter.enable nvidia_x11.fabricmanager
++ lib.optional cfg.nvidiaPersistenced nvidia_x11.persistenced;
})
]);
}

View file

@ -19,7 +19,11 @@ in
};
apiKeyFile = mkOption {
type = types.str;
description = "File containing the API key.";
description = ''
The path to a file containing the API key.
The file is securely passed to the service by leveraging systemd credentials.
No special permissions need to be set on this file.
'';
example = "/run/secrets/sabnzbd_apikey";
};
};
@ -30,18 +34,24 @@ in
serviceOpts =
let
servers = lib.zipAttrs cfg.servers;
apiKeys = lib.concatStringsSep "," (builtins.map (file: "$(cat ${file})") servers.apiKeyFile);
credentials = lib.imap0 (i: v: { name = "apikey-${toString i}"; path = v; }) servers.apiKeyFile;
in
{
serviceConfig.LoadCredential = builtins.map ({ name, path }: "${name}:${path}") credentials;
environment = {
METRICS_PORT = toString cfg.port;
METRICS_ADDR = cfg.listenAddress;
SABNZBD_BASEURLS = lib.concatStringsSep "," servers.baseUrl;
};
script = ''
export SABNZBD_APIKEYS="${apiKeys}"
exec ${lib.getExe pkgs.prometheus-sabnzbd-exporter}
'';
script =
let
apiKeys = lib.concatStringsSep "," (builtins.map (cred: "$(< $CREDENTIALS_DIRECTORY/${cred.name})") credentials);
in
''
export SABNZBD_APIKEYS="${apiKeys}"
exec ${lib.getExe pkgs.prometheus-sabnzbd-exporter}
'';
};
}

View file

@ -590,6 +590,7 @@ in
"d /var/lib/nut 700"
];
services.udev.packages = [ pkgs.nut ];
/*
users.users.nut =

View file

@ -4,13 +4,13 @@
pythonPackages.buildPythonApplication rec {
pname = "pithos";
version = "1.6.0";
version = "1.6.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
hash = "sha256-cFmsdQXfGxgpKe32dw1lgoANU9Drhu5Mecyz37BVP4g=";
hash = "sha256-GPDbFlwiGT/B2paX33d3mUCV77q+fPM0LMaKFsQQjjQ=";
};
format = "other";

View file

@ -4,7 +4,7 @@
, fetchFromGitHub
, cmake
, boost
, cgal_5
, cgal
, eigen
, flann
, gdal
@ -41,7 +41,7 @@ mkDerivation rec {
buildInputs = [
boost
cgal_5
cgal
flann
gdal
gmp

View file

@ -14,7 +14,7 @@
, levmar
, qhull
, cmake
, cgal_5
, cgal
, boost179
, mpfr
, xercesc
@ -45,7 +45,7 @@ mkDerivation rec {
gmp
levmar
qhull
cgal_5
cgal
boost179
mpfr
xercesc

View file

@ -11,7 +11,7 @@
, libGLU, libGL
, glew
, opencsg
, cgal
, cgal_4
, mpfr
, gmp
, glib
@ -60,7 +60,7 @@ mkDerivation rec {
nativeBuildInputs = [ bison flex pkg-config gettext qmake ];
buildInputs = [
eigen boost glew opencsg cgal mpfr gmp glib
eigen boost glew opencsg cgal_4 mpfr gmp glib
harfbuzz lib3mf libzip double-conversion freetype fontconfig
qtbase qtmultimedia qscintilla cairo
] ++ lib.optionals stdenv.isLinux [ libGLU libGL wayland wayland-protocols qtwayland ]

View file

@ -6,11 +6,11 @@ let
in
stdenv.mkDerivation rec {
pname = "mediainfo-gui";
version = "23.10";
version = "23.11";
src = fetchurl {
url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz";
hash = "sha256-t0OuJSHZ2Oi5pYUNfCop3jC6d321JzjQ37oXzARnduc=";
hash = "sha256-gByxsNG//MEibeymISoe41Mi6LsSYwozu7B6kqioycM=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View file

@ -18,6 +18,7 @@
, substituteAll
, systemd
, udev
, gnused
}:
stdenv.mkDerivation rec {
@ -30,6 +31,13 @@ stdenv.mkDerivation rec {
};
patches = [
# This patch injects a default value for NUT_CONFPATH into the nutshutdown script
# since the way we build the package results in the binaries being hardcoded to check
# $out/etc/ups.conf instead of /etc/nut/ups.conf (where the module places the file).
# We also cannot use `--sysconfdir=/etc/nut` since that results in the install phase
# trying to install directly into /etc/nut which predictably fails
./nutshutdown-conf-default.patch
(substituteAll {
src = ./hardcode-paths.patch;
avahi = "${avahi}/lib";
@ -63,16 +71,23 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace $out/lib/systemd/system-shutdown/nutshutdown \
--replace /bin/sed "${gnused}/bin/sed" \
--replace /bin/sleep "${coreutils}/bin/sleep" \
--replace /bin/systemctl "${systemd}/bin/systemctl"
for file in system/{nut-monitor.service,nut-driver-enumerator.service,nut-server.service,nut-driver@.service} system-shutdown/nutshutdown; do
substituteInPlace $out/lib/systemd/$file \
--replace "$out/etc/nut.conf" "/etc/nut.conf"
substituteInPlace $out/lib/systemd/$file \
--replace "$out/etc/nut.conf" "/etc/nut/nut.conf"
done
substituteInPlace $out/lib/systemd/system/nut-driver-enumerator.path \
--replace "$out/etc/ups.conf" "/etc/nut/ups.conf"
# we don't need init.d scripts
rm -r $out/share/solaris-init
# Suspicious/overly broad rule, remove it until we know better
rm $out/etc/udev/rules.d/52-nut-ipmipsu.rules
'';
meta = with lib; {

View file

@ -0,0 +1,10 @@
diff --git a/scripts/systemd/nutshutdown.in b/scripts/systemd/nutshutdown.in
index ace2485b3..9dee869bb 100755
--- a/scripts/systemd/nutshutdown.in
+++ b/scripts/systemd/nutshutdown.in
@@ -1,4 +1,5 @@
#!/bin/sh
+export NUT_CONFPATH="${NUT_CONFPATH-/etc/nut}"
# This script requires both nut-server (drivers)
# and nut-client (upsmon) to be present locally

View file

@ -8,13 +8,13 @@ let config-module = "github.com/f1bonacc1/process-compose/src/config";
in
buildGoModule rec {
pname = "process-compose";
version = "0.77.4";
version = "0.77.6";
src = fetchFromGitHub {
owner = "F1bonacc1";
repo = pname;
rev = "v${version}";
hash = "sha256-uouF43SokBD+LCMqSDWJ3pj2LznfJYJoUkoTQ1TyYyI=";
hash = "sha256-sTRKk74R60TPuYtAvmc1o0YA934SZx39DrjyGkc0smc=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;

View file

@ -10,7 +10,7 @@
, wrapGAppsHook
, boost
, cereal
, cgal_5
, cgal
, curl
, dbus
, eigen
@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: {
binutils
boost
cereal
cgal_5
cgal
curl
dbus
eigen

View file

@ -15,13 +15,13 @@
stdenv.mkDerivation rec {
pname = "asn";
version = "0.75";
version = "0.75.2";
src = fetchFromGitHub {
owner = "nitefood";
repo = "asn";
rev = "refs/tags/v${version}";
hash = "sha256-XqP0Nx5pfYtM1xXxEDGooONj7nQ9UngJ9/AOZefnPV8=";
hash = "sha256-G8TDl9R5nbUzmjcr1m+eNNybSDqb64c7ZOO/viL5/Q4=";
};
nativeBuildInputs = [

View file

@ -195,7 +195,7 @@ let
buildPlatformLlvmStdenv.cc
pkg-config
libuuid
libpng # needed for "host/generate_colors_info"
(libpng.override { apngSupport = false; }) # needed for "host/generate_colors_info"
]
# When cross-compiling, chromium builds a huge proportion of its
# components for both the `buildPlatform` (which it calls

View file

@ -5,16 +5,16 @@
buildGoModule rec {
pname = "goeland";
version = "0.16.0";
version = "0.17.0";
src = fetchFromGitHub {
owner = "slurdge";
repo = pname;
rev = "v${version}";
sha256 = "sha256-bjPmhNJFkN0N0Mx3Q4RJuNfeqFy9v8KphiAU1WyKCo4=";
sha256 = "sha256-ISAaV1MgqnzO2fMgoZZKT8FSDq6XIRvjWG72dALY+rU=";
};
vendorHash = "sha256-jYrPsVagGgvpQ9Zj3o2kB82xgw/yaJS9BXxuqMkNjEA=";
vendorHash = "sha256-uk1Ew77XaS/k7QXqNa70Nyynb+6pzs7B5jhusz3ffZY=";
ldflags = [
"-s"

View file

@ -2,10 +2,10 @@
stdenv.mkDerivation rec {
pname = "gatk";
version = "4.4.0.0";
version = "4.5.0.0";
src = fetchzip {
url = "https://github.com/broadinstitute/gatk/releases/download/${version}/gatk-${version}.zip";
sha256 = "sha256-svOtIS6gz9nwVgVmVQbk9z6Ufyobpn6bFbZY4zurvUI=";
sha256 = "sha256-c3YZsSCjZY75jooiqtc8x/xsWTvYm9labUcOydDlSRQ=";
};
nativeBuildInputs = [ makeWrapper ];

View file

@ -6,19 +6,19 @@ let
avogadroI18N = fetchFromGitHub {
owner = "OpenChemistry";
repo = "avogadro-i18n";
rev = "3b8a86cc37e988b043d1503d2f11068389b0aca3";
sha256 = "9wLY7/EJyIZYnlUAMsViCwD5kGc1vCNbk8vUhb90LMQ=";
rev = "7eef0b83ded6221a3ddb85c0118cc26f9a35375c";
hash = "sha256-AR/y70zeYR9xBzWDB5JXjJdDM+NLOX6yxCQte2lYN/U=";
};
in stdenv.mkDerivation rec {
pname = "avogadro2";
version = "1.97.0";
version = "1.98.1";
src = fetchFromGitHub {
owner = "OpenChemistry";
repo = "avogadroapp";
rev = version;
hash = "sha256-gZpMgFSPz70QNfd8gH5Jb9RTxQfQalWx33LkgXLEqOQ=";
hash = "sha256-N35WGYZbgfjKnorzGKCnbBvlrlt9Vr04YIG2R3k+b8A=";
};
postUnpack = ''

View file

@ -4,7 +4,7 @@
, fparser
, tinyxml
, hdf5
, cgal_5
, cgal
, vtk
, boost
, gmp
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
patches = [./searchPath.patch ];
buildInputs = [
cgal_5
cgal
boost
gmp
mpfr

View file

@ -0,0 +1,38 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, fetchpatch
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bc-ur";
version = "0.3.0";
src = fetchFromGitHub {
owner = "BlockchainCommons";
repo = "bc-ur";
rev = finalAttrs.version;
hash = "sha256-j7nmAZH1OL7R5H3jqQomg7kwPOvIHMqrfSk7mq/f7Cg=";
};
patches = [
# Fix missing includes, building on gcc13, add CMakeList.txt
(fetchpatch {
url = "https://raw.githubusercontent.com/feather-wallet/feather/632963a9e22bf4c8bbe6b5b4d895e31bda17bafd/contrib/depends/patches/bc-ur/build-fix.patch";
hash = "sha256-F53/z0maUGfdzJ7qjcLjTzn6+80oxu4sqfQPsDo4HZ0=";
})
];
nativeBuildInputs = [
cmake
];
meta = with lib; {
homepage = "https://github.com/BlockchainCommons/bc-ur";
description = "UR reference library in C++";
license = licenses.bsd2Patent;
maintainers = with maintainers; [ surfaceflinger ];
platforms = platforms.linux;
};
})

View file

@ -15,11 +15,11 @@
stdenv.mkDerivation rec {
pname = "bruno";
version = "1.4.0";
version = "1.5.0";
src = fetchurl {
url = "https://github.com/usebruno/bruno/releases/download/v${version}/bruno_${version}_amd64_linux.deb";
hash = "sha256-yCYI2c9M19d1+BpnM7YJLkZk8Vdix+YSWCa5qsCMBxw=";
hash = "sha256-ptrayWDnRXGUC/mgSnQ/8sIEdey+6uoa3LGBGPQYuY8=";
};
nativeBuildInputs = [ autoPatchelfHook dpkg wrapGAppsHook ];

View file

@ -1,4 +1,5 @@
{ boost
{ bc-ur
, boost
, cmake
, fetchFromGitHub
, hidapi
@ -20,13 +21,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "feather";
version = "2.5.2";
version = "2.6.1";
src = fetchFromGitHub {
owner = "feather-wallet";
repo = "feather";
rev = finalAttrs.version;
hash = "sha256-OSBG2W35GYlViwz5eXokpScrMTtPSaWAgEUNw2urm6w=";
hash = "sha256-szMNSqkocf/aVs1aF+TLV1qu0MDHTNDiO4V1j4ySBvQ=";
fetchSubmodules = true;
};
@ -37,6 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
bc-ur
boost
hidapi
libsodium

View file

@ -0,0 +1,131 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, testers
, boost
, cmake
, doxygen
, gtest
, leveldb
, lomiri
, pkg-config
, python3
}:
stdenv.mkDerivation (finalAttrs: {
pname = "persistent-cache-cpp";
version = "1.0.6";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/persistent-cache-cpp";
rev = finalAttrs.version;
hash = "sha256-RLZiYY0Y9LT+ajM4Va4MpVVDBlu2yvCpn8bNGMB8ydo=";
};
outputs = [
"out"
"dev"
"doc"
];
patches = [
# Version in CMakeLists.txt didn't get bumped, emits wrong version in pkg-config
# Remove when https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/merge_requests/13 merged & in release
(fetchpatch {
name = "0001-persistent-cache-cpp-CMakeLists-txt-Update-version.patch";
url = "https://gitlab.com/OPNA2608/persistent-cache-cpp/-/commit/20d5d3f61563c62bcbe85e71ddc4fe16d7c995d5.patch";
hash = "sha256-BKovtT9OvV+xEwBO8AZTxAzL9kqyDB9ip32t2Xx4eIk=";
})
# PersistentStringCacheImpl.exceptions test fails on LLVM's libcxx, it depends on std::system_error producing a very specific exception text
# Expects "Unknown error 666", gets "unspecified generic_category error"
# Remove when https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/merge_requests/14 merged & in release
(fetchpatch {
name = "0002-persistent-cache-cpp-persistent_string_cache_impl_test-libcxx-fix.patch";
url = "https://gitlab.com/OPNA2608/persistent-cache-cpp/-/commit/a696dbd3093b8333f9ee1f0cad846b2256c729c5.patch";
hash = "sha256-SJxdXeM7W+WKEmiLTwnQYAM7YmPayEk6vPb46y4thv4=";
})
# Enable usage of BUILD_TESTING to opting out of tests
# Remove when https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/merge_requests/15 merged & in release
(fetchpatch {
name = "0003-persistent-cache-cpp-Enable-opting-out-of-tests.patch";
url = "https://gitlab.com/OPNA2608/persistent-cache-cpp/-/commit/1fb06d28c16325e90046e93662c0f5fd16c29b4a.patch";
hash = "sha256-2/6EYBh71S4dzqWEde+3dLOGp015fN6IifAj1bI1XAI=";
})
# Enable linking based on stdenv (static or dynamic)
# Remove when https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/merge_requests/16 merged & in release
(fetchpatch {
name = "0004-persistent-cache-cpp-Un-hardcode-static-linking.patch";
url = "https://gitlab.com/OPNA2608/persistent-cache-cpp/-/commit/45cd84fe76e3a0e1da41a662df695009a6f4f07e.patch";
hash = "sha256-1UjdhzrjnIUO1ySaZTm0vkdNgok0RNlGtNOWUoAUlzU=";
})
];
postPatch = ''
# Wrong concatenation
substituteInPlace data/libpersistent-cache-cpp.pc.in \
--replace "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "\''${prefix}/lib"
# Runs in parallel to other tests, limit to 1 thread
substituteInPlace tests/headers/compile_headers.py \
--replace 'multiprocessing.cpu_count()' '1'
'' + lib.optionalString finalAttrs.finalPackage.doCheck ''
patchShebangs tests/{headers,whitespace}/*.py
'';
nativeBuildInputs = [
cmake
doxygen
pkg-config
];
buildInputs = [
boost
lomiri.cmake-extras
];
propagatedBuildInputs = [
leveldb
];
nativeCheckInputs = [
python3
];
checkInputs = [
gtest
];
cmakeFlags = [
# error: 'old_version' may be used uninitialized
(lib.cmakeBool "Werror" false)
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "Cache of key-value pairs with persistent storage for C++ 11";
longDescription = ''
A persistent cache for arbitrary (possibly large amount of data, such as
image files) that is fast, scalable, and crash-proof.
'';
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp";
license = licenses.lgpl3Only;
maintainers = teams.lomiri.members;
platforms = platforms.unix;
pkgConfigModules = [
"libpersistent-cache-cpp"
];
};
})

View file

@ -21,6 +21,10 @@ buildNpmPackage rec {
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
npm --prefix packages/cli run copy-assets
'';
postInstall = ''
rm $out/lib/node_modules/@redocly/cli/node_modules/@redocly/{cli,openapi-core}
cp -R packages/cli $out/lib/node_modules/@redocly/cli/node_modules/@redocly/cli

View file

@ -0,0 +1,47 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, scdoc
, installShellFiles
, snippetexpanderd
}:
buildGoModule rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpander";
vendorHash = "sha256-wSAho59yxcXTu1zQ5x783HT4gtfSM4GdsOEeC1wfHhE=";
proxyVendor = true;
modRoot = "cmd/snippetexpander";
nativeBuildInputs = [
scdoc
installShellFiles
];
buildInputs = [
snippetexpanderd
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
make man
installManPage snippetexpander.1
'';
meta = with lib; {
description = "Your little expandable text snippet helper CLI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpander";
};
}

View file

@ -0,0 +1,63 @@
{ lib
, stdenv
, buildGoModule
, fetchFromSourcehut
, pkg-config
, makeWrapper
, scdoc
, installShellFiles
, xorg
, gtk3
}:
buildGoModule rec {
pname = "snippetexpanderd";
version = "1.0.1";
src = fetchFromSourcehut {
owner = "~ianmjones";
repo = "snippetexpander";
rev = "v${version}";
hash = "sha256-y3TJ+L3kXYfZFzAD1vmhvP6Yarctu5LHq/74005h8sI=";
};
vendorHash = "sha256-QX8HI8I1ZJI6HJ1sl86OiJ4nxwFAjHH8h1zB9ASJaQs=";
modRoot = "cmd/snippetexpanderd";
nativeBuildInputs = [
pkg-config
makeWrapper
scdoc
installShellFiles
];
buildInputs = [
xorg.libX11
gtk3
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
make man
installManPage snippetexpanderd.1 snippetexpander-placeholders.5
'';
postFixup = ''
wrapProgram $out/bin/snippetexpanderd \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]}
'';
meta = with lib; {
description = "Your little expandable text snippet helper daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpanderd";
};
}

View file

@ -0,0 +1,70 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, makeWrapper
, wails
, scdoc
, installShellFiles
, xorg
, gtk3
, webkitgtk
, gsettings-desktop-schemas
, snippetexpanderd
}:
buildGoModule rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpandergui";
vendorHash = "sha256-iZfZdT8KlfZMVLQcYmo6EooIdsSGrpO/ojwT9Ft1GQI=";
proxyVendor = true;
modRoot = "cmd/snippetexpandergui";
nativeBuildInputs = [
makeWrapper
wails
scdoc
installShellFiles
];
buildInputs = [
xorg.libX11
gtk3
webkitgtk
gsettings-desktop-schemas
snippetexpanderd
];
ldflags = [
"-s"
"-w"
];
tags = [
"desktop"
"production"
];
postInstall = ''
mv build/linux/share $out/share
make man
installManPage snippetexpandergui.1
'';
postFixup = ''
wrapProgram $out/bin/snippetexpandergui \
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}
'';
meta = with lib; {
description = "Your little expandable text snippet helper GUI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpandergui";
};
}

View file

@ -0,0 +1,64 @@
{ lib
, stdenv
, fetchFromSourcehut
, pkg-config
, vala
, wrapGAppsHook
, installShellFiles
, scdoc
, at-spi2-atk
, at-spi2-core
, dbus
, gtk3
, ibus
, libgee
, xorg
, snippetexpanderd
}:
stdenv.mkDerivation rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpanderx";
sourceRoot = "source/cmd/snippetexpanderx";
nativeBuildInputs = [
pkg-config
vala
wrapGAppsHook
installShellFiles
scdoc
];
buildInputs = [
at-spi2-atk
at-spi2-core
dbus
gtk3
ibus
libgee
xorg.libX11
snippetexpanderd
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -m555 snippetexpanderx $out/bin/
installManPage snippetexpanderx.1
runHook postInstall
'';
# There are no tests.
doCheck = false;
meta = with lib; {
description = "Your little expandable text snippet helper auto expander daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpanderx";
};
}

View file

@ -7,14 +7,14 @@
stdenvNoCC.mkDerivation rec {
pname = "folder-color-switcher";
version = "1.6.0";
version = "1.6.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
# They don't really do tags, this is just a named commit.
rev = "826df0b71c7c3b686421437eac86883945dc5956";
sha256 = "sha256-WdOTyladZ0U39wbhqsXzg9l3mJ5UGV99yVg1PWscP2w=";
rev = "ebab2114649cc688a05e30857f6706f16fe82307";
sha256 = "sha256-/VbgFuSoeDIiJG4owXbn7yT0ILrAdKkkhSkScnnJa+8=";
};
nativeBuildInputs = [
@ -24,7 +24,7 @@ stdenvNoCC.mkDerivation rec {
postPatch = ''
substituteInPlace usr/share/nemo-python/extensions/nemo-folder-color-switcher.py \
--replace "/usr/share/locale" "$out/share" \
--replace "/usr/share/locale" "$out/share/locale" \
--replace "/usr/share/folder-color-switcher/colors.d" "/run/current-system/sw/share/folder-color-switcher/colors.d" \
--replace "/usr/share/folder-color-switcher/color.svg" "$out/share/folder-color-switcher/color.svg"

View file

@ -1,6 +1,7 @@
{ python3
, lib
, fetchFromGitHub
, cinnamon-translations
}:
let
@ -17,6 +18,9 @@ python3.pkgs.buildPythonApplication rec {
postPatch = ''
substituteInPlace setup.py \
--replace "/usr/share" "share"
substituteInPlace nemo-extension/nemo-emblems.py \
--replace "/usr/share/locale" "${cinnamon-translations}/share/locale"
'';
meta = with lib; {

View file

@ -8,6 +8,7 @@
, gtk3
, nemo
, gnome
, cinnamon-translations
}:
let
@ -33,7 +34,8 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace src/nemo-fileroller.c \
--replace "file-roller" "${lib.getExe gnome.file-roller}"
--replace "file-roller" "${lib.getExe gnome.file-roller}" \
--replace "GNOMELOCALEDIR" "${cinnamon-translations}/share/locale"
'';
PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}";

View file

@ -4,12 +4,12 @@ rec {
# When you bump this, you should make sure all nemo-extensions
# are actually using this file since we try to deal with tags
# like nemo-fileroller-5.6.1 according to upstream's wishes.
version = "6.0.0";
version = "6.0.1";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
rev = version;
sha256 = "sha256-M8ImntyfFfSL591UpqZosE7F8ydbpfrBhcLOBtW/sGQ=";
sha256 = "sha256-zuE0SO5VJ2kKjK7JgsSf+wJgfyffTHhfICslEoPKK8Q=";
};
}

View file

@ -1,7 +1,6 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
, qttools
@ -10,6 +9,7 @@
, dtkwidget
, qt5integration
, qt5platform-plugins
, qtsvg
, dde-qt-dbus-factory
, qtmultimedia
, qtwebengine
@ -20,27 +20,17 @@
stdenv.mkDerivation rec {
pname = "deepin-voice-note";
version = "6.0.13";
version = "6.0.15";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
hash = "sha256-yDlWyMGkSToGCN7tuZNR8Mz7MUOZ7355w4H0OzeHBrs=";
hash = "sha256-k6LFMs2/OQQyeGI5WXBGWkAAY4GeP8LaA8hTXFwbaCM=";
};
patches = [
./use_v23_dbus_interface.diff
(fetchpatch {
name = "Adjust-the-audio-port-available-range.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/a876e4c4cf7d77e50071246f9fb6998aa62def77.patch";
hash = "sha256-J/PPdj1Am/v2Sw2Dv2XvZJAy/6Tf7OoTfrbOB9rc5m8=";
})
(fetchpatch {
name = "fix-build-error-with-new-dtk.patch";
url = "https://github.com/linuxdeepin/deepin-voice-note/commit/9ce211f603deaff21b881e1c4f43d53e33a85347.patch";
hash = "sha256-oP+AzMniONxjYIFust8fGaD8/UOjKr4yZiRUkdTMd5w=";
})
];
postPatch = ''
@ -59,8 +49,8 @@ stdenv.mkDerivation rec {
buildInputs = [
qtbase
qtsvg
dtkwidget
qt5integration
qt5platform-plugins
dde-qt-dbus-factory
qtmultimedia
@ -77,6 +67,11 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DVERSION=${version}" ];
# qt5integration must be placed before qtsvg in QT_PLUGIN_PATH
qtWrapperArgs = [
"--prefix QT_PLUGIN_PATH : ${qt5integration}/${qtbase.qtPluginPrefix}"
];
preFixup = ''
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';

View file

@ -4,13 +4,13 @@
}:
stdenvNoCC.mkDerivation rec {
pname = "deepin-desktop-base";
version = "2022.11.15-deepin";
version = "2023.09.05";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-GTgIHWz+x1Pl3F4zKA9V8o2oq6c53OK94q95WoMG+Qo=";
hash = "sha256-Gqp56TbkuTOI3aT7UmRuYBjUwRiOoIUHiRf0DaY0yew=";
};
makeFlags = [ "DESTDIR=${placeholder "out"}" ];

View file

@ -23,6 +23,7 @@ let
#### QML / QML-related
lomiri-action-api = callPackage ./qml/lomiri-action-api { };
lomiri-notifications = callPackage ./qml/lomiri-notifications { };
lomiri-settings-components = callPackage ./qml/lomiri-settings-components { };
lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { };

View file

@ -0,0 +1,92 @@
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, cmake
, dbus
, libqtdbustest
, lomiri-api
, pkg-config
, qtbase
, qtdeclarative
}:
stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-notifications";
version = "1.3.0";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lomiri-notifications";
rev = finalAttrs.version;
hash = "sha256-EGslfTgfADrmVGhNLG7HWqcDKhu52H/r41j7fxoliko=";
};
patches = [
# Drop use of deprecated qt5_use_modules
# Remove when https://gitlab.com/ubports/development/core/lomiri-notifications/-/merge_requests/11 merged & in release
(fetchpatch {
url = "https://gitlab.com/OPNA2608/lomiri-notifications/-/commit/5d164d6d8d68efe1d14154eca4d0d736ce2a1265.patch";
hash = "sha256-nUg0zUft1n4AlotOaZgDqWbiVDvWvMizdlClavwygoI=";
})
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
# Need to replace prefix to not try to install into lomiri-api prefix
substituteInPlace src/CMakeLists.txt \
--replace '--variable=plugindir' '--define-variable=prefix=''${CMAKE_INSTALL_PREFIX} --variable=plugindir'
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
sed -i CMakeLists.txt -e '/add_subdirectory(test)/d'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
lomiri-api
qtbase
qtdeclarative
];
nativeCheckInputs = [
dbus
];
checkInputs = [
libqtdbustest
];
dontWrapQtApps = true;
cmakeFlags = [
# In case anything still depends on deprecated hints
"-DENABLE_UBUNTU_COMPAT=ON"
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
# Deals with DBus
enableParallelChecking = false;
preCheck = ''
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
'';
passthru.updateScript = gitUpdater { };
meta = with lib; {
description = "Free Desktop Notification server QML implementation for Lomiri";
homepage = "https://gitlab.com/ubports/development/core/lomiri-notifications";
license = licenses.gpl3Only;
maintainers = teams.lomiri.members;
platforms = platforms.linux;
};
})

View file

@ -0,0 +1,20 @@
{ callPackage }:
let
juliaWithPackages = callPackage ../../julia-modules {};
wrapJulia = julia: julia.overrideAttrs (oldAttrs: {
passthru = (oldAttrs.passthru or {}) // {
withPackages = juliaWithPackages.override { inherit julia; };
};
});
in
{
julia_16-bin = wrapJulia (callPackage ./1.6-bin.nix {});
julia_18-bin = wrapJulia (callPackage ./1.8-bin.nix {});
julia_19-bin = wrapJulia (callPackage ./1.9-bin.nix {});
julia_18 = wrapJulia (callPackage ./1.8.nix {});
julia_19 = wrapJulia (callPackage ./1.9.nix {});
}

View file

@ -0,0 +1,193 @@
{ lib
, callPackage
, runCommand
, fetchFromGitHub
, fetchgit
, fontconfig
, git
, makeWrapper
, writeText
, writeTextFile
, python3
# Artifacts dependencies
, fetchurl
, glibc
, pkgs
, stdenv
, julia
# Special registry which is equal to JuliaRegistries/General, but every Versions.toml
# entry is augmented with a Nix sha256 hash
, augmentedRegistry ? callPackage ./registry.nix {}
# Other overridable arguments
, extraLibs ? []
, precompile ? true
, setDefaultDepot ? true
, makeWrapperArgs ? ""
, packageOverrides ? {}
, makeTransitiveDependenciesImportable ? false # Used to support symbol indexing
}:
packageNames:
let
util = callPackage ./util.nix {};
in
let
# Some Julia packages require access to Python. Provide a Nixpkgs version so it
# doesn't try to install its own.
pythonToUse = let
extraPythonPackages = ((callPackage ./extra-python-packages.nix { inherit python3; }).getExtraPythonPackages packageNames);
in (if extraPythonPackages == [] then python3
else util.addPackagesToPython python3 (map (pkg: lib.getAttr pkg python3.pkgs) extraPythonPackages));
# Start by wrapping Julia so it has access to Python and any other extra libs.
# Also, prevent various packages (CondaPkg.jl, PythonCall.jl) from trying to do network calls.
juliaWrapped = runCommand "julia-${julia.version}-wrapped" { buildInputs = [makeWrapper]; inherit makeWrapperArgs; } ''
mkdir -p $out/bin
makeWrapper ${julia}/bin/julia $out/bin/julia \
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLibs}" \
--set FONTCONFIG_FILE ${fontconfig.out}/etc/fonts/fonts.conf \
--set PYTHONHOME "${pythonToUse}" \
--prefix PYTHONPATH : "${pythonToUse}/${pythonToUse.sitePackages}" \
--set PYTHON ${pythonToUse}/bin/python $makeWrapperArgs \
--set JULIA_CONDAPKG_OFFLINE yes \
--set JULIA_CONDAPKG_BACKEND Null \
--set JULIA_PYTHONCALL_EXE "@PyCall"
'';
# If our closure ends up with certain packages, add others.
packageImplications = {
# Because we want to put PythonCall in PyCall mode so it doesn't try to download
# Python packages
PythonCall = ["PyCall"];
};
# Invoke Julia resolution logic to determine the full dependency closure
packageOverridesRepoified = lib.mapAttrs util.repoifySimple packageOverrides;
closureYaml = callPackage ./package-closure.nix {
inherit augmentedRegistry julia packageNames packageImplications;
packageOverrides = packageOverridesRepoified;
};
# Generate a Nix file consisting of a map from dependency UUID --> package info with fetchgit call:
# {
# "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" = {
# src = fetchgit {...};
# name = "...";
# version = "...";
# treehash = "...";
# };
# ...
# }
dependencies = runCommand "julia-sources.nix" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml])) git]; } ''
python ${./python}/sources_nix.py \
"${augmentedRegistry}" \
'${lib.generators.toJSON {} packageOverridesRepoified}' \
"${closureYaml}" \
"$out"
'';
# Import the Nix file from the previous step (IFD) and turn each dependency repo into
# a dummy Git repository, as Julia expects. Format the results as a YAML map from
# dependency UUID -> Nix store location:
# {
# "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3":"/nix/store/...-NaNMath.jl-0877504",
# ...
# }
# This is also the point where we apply the packageOverrides.
dependencyUuidToInfo = import dependencies { inherit fetchgit; };
fillInOverrideSrc = uuid: info:
if lib.hasAttr info.name packageOverrides then (info // { src = lib.getAttr info.name packageOverrides; }) else info;
dependencyUuidToRepo = lib.mapAttrs util.repoifyInfo (lib.mapAttrs fillInOverrideSrc dependencyUuidToInfo);
dependencyUuidToRepoYaml = writeTextFile {
name = "dependency-uuid-to-repo.yml";
text = lib.generators.toYAML {} dependencyUuidToRepo;
};
# Given the augmented registry, closure info yaml, and dependency path yaml, construct a complete
# Julia registry containing all the necessary packages
dependencyUuidToInfoYaml = writeTextFile {
name = "dependency-uuid-to-info.yml";
text = lib.generators.toYAML {} dependencyUuidToInfo;
};
fillInOverrideSrc' = uuid: info:
if lib.hasAttr info.name packageOverridesRepoified then (info // { src = lib.getAttr info.name packageOverridesRepoified; }) else info;
overridesOnly = lib.mapAttrs fillInOverrideSrc' (lib.filterAttrs (uuid: info: info.src == null) dependencyUuidToInfo);
minimalRegistry = runCommand "minimal-julia-registry" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml])) git]; } ''
python ${./python}/minimal_registry.py \
"${augmentedRegistry}" \
"${closureYaml}" \
'${lib.generators.toJSON {} overridesOnly}' \
"${dependencyUuidToRepoYaml}" \
"$out"
'';
# Next, deal with artifacts. Scan each artifacts file individually and generate a Nix file that
# produces the desired Overrides.toml.
artifactsNix = runCommand "julia-artifacts.nix" { buildInputs = [(python3.withPackages (ps: with ps; [toml pyyaml]))]; } ''
python ${./python}/extract_artifacts.py \
"${dependencyUuidToRepoYaml}" \
"${closureYaml}" \
"${juliaWrapped}/bin/julia" \
"${if lib.versionAtLeast julia.version "1.7" then ./extract_artifacts.jl else ./extract_artifacts_16.jl}" \
'${lib.generators.toJSON {} (import ./extra-libs.nix)}' \
"$out"
'';
# Import the artifacts Nix to build Overrides.toml (IFD)
artifacts = import artifactsNix { inherit lib fetchurl pkgs glibc stdenv; };
overridesJson = writeTextFile {
name = "Overrides.json";
text = lib.generators.toJSON {} artifacts;
};
overridesToml = runCommand "Overrides.toml" { buildInputs = [(python3.withPackages (ps: with ps; [toml]))]; } ''
python ${./python}/format_overrides.py \
"${overridesJson}" \
"$out"
'';
# Build a Julia project and depot. The project contains Project.toml/Manifest.toml, while the
# depot contains package build products (including the precompiled libraries, if precompile=true)
projectAndDepot = callPackage ./depot.nix {
inherit closureYaml extraLibs overridesToml packageImplications precompile;
julia = juliaWrapped;
registry = minimalRegistry;
packageNames = if makeTransitiveDependenciesImportable
then lib.mapAttrsToList (uuid: info: info.name) dependencyUuidToInfo
else packageNames;
};
in
runCommand "julia-${julia.version}-env" {
buildInputs = [makeWrapper];
inherit julia;
inherit juliaWrapped;
# Expose the steps we used along the way in case the user wants to use them, for example to build
# expressions and build them separately to avoid IFD.
inherit dependencies;
inherit closureYaml;
inherit dependencyUuidToInfoYaml;
inherit dependencyUuidToRepoYaml;
inherit minimalRegistry;
inherit artifactsNix;
inherit overridesJson;
inherit overridesToml;
inherit projectAndDepot;
} (''
mkdir -p $out/bin
makeWrapper ${juliaWrapped}/bin/julia $out/bin/julia \
--suffix JULIA_DEPOT_PATH : "${projectAndDepot}/depot" \
--set-default JULIA_PROJECT "${projectAndDepot}/project" \
--set-default JULIA_LOAD_PATH '@:${projectAndDepot}/project/Project.toml:@v#.#:@stdlib'
'' + lib.optionalString setDefaultDepot ''
sed -i '2 i\JULIA_DEPOT_PATH=''${JULIA_DEPOT_PATH-"$HOME/.julia"}' $out/bin/julia
'')

View file

@ -0,0 +1,85 @@
{ lib
, runCommand
, cacert
, curl
, git
, julia
, python3
, closureYaml
, extraLibs
, overridesToml
, packageNames
, packageImplications
, precompile
, registry
}:
runCommand "julia-depot" {
nativeBuildInputs = [curl git julia (python3.withPackages (ps: with ps; [pyyaml]))] ++ extraLibs;
inherit precompile registry;
} ''
export HOME=$(pwd)
echo "Building Julia depot and project with the following inputs"
echo "Julia: ${julia}"
echo "Registry: $registry"
echo "Overrides ${overridesToml}"
mkdir -p $out/project
export JULIA_PROJECT="$out/project"
mkdir -p $out/depot/artifacts
export JULIA_DEPOT_PATH="$out/depot"
cp ${overridesToml} $out/depot/artifacts/Overrides.toml
# These can be useful to debug problems
# export JULIA_DEBUG=Pkg
# export JULIA_DEBUG=loading
export JULIA_SSL_CA_ROOTS_PATH="${cacert}/etc/ssl/certs/ca-bundle.crt"
# Only precompile if configured to below
export JULIA_PKG_PRECOMPILE_AUTO=0
# Prevent a warning where Julia tries to download package server info
export JULIA_PKG_SERVER=""
# See if we need to add any extra package names based on the closure
# and the packageImplications. We're using the full closure YAML here since
# it's available, which is slightly weird, but it should work just as well
# for finding the extra packages we need to add
python ${./python}/find_package_implications.py "${closureYaml}" '${lib.generators.toJSON {} packageImplications}' extra_package_names.txt
# git config --global --add safe.directory '/nix'
export JULIA_PKG_USE_CLI_GIT="true"
julia -e ' \
import Pkg
import Pkg.Types: PRESERVE_NONE
Pkg.Registry.add(Pkg.RegistrySpec(path="${registry}"))
input = ${lib.generators.toJSON {} packageNames} ::Vector{String}
if isfile("extra_package_names.txt")
append!(input, readlines("extra_package_names.txt"))
end
input = unique(input)
if !isempty(input)
println("Adding packages: " * join(input, " "))
Pkg.add(input; preserve=PRESERVE_NONE)
Pkg.instantiate()
if "precompile" in keys(ENV) && ENV["precompile"] != "0" && ENV["precompile"] != ""
Pkg.precompile()
end
end
# Remove the registry to save space
Pkg.Registry.rm("General")
'
''

View file

@ -0,0 +1,15 @@
# A map from a Julia package (typically a JLL package) to extra libraries
# that they require from Nix.
# The libraries should be strings evaluated in a "with pkgs" context.
{
# Qt5Base_jll
# Needs access to dbus or you get "Cannot find libdbus-1 in your system"
# Repro: build environment with ["Plots"]
# > using Plots; plot(cos, 0, 2pi)
"ea2cea3b-5b76-57ae-a6ef-0a8af62496e1" = ["dbus.lib"];
# Qt6Base_jll
# Same reason as Qt5Base_jll
"c0090381-4147-56d7-9ebc-da0b1113ec56" = ["dbus.lib"];
}

View file

@ -0,0 +1,22 @@
{ lib
, python3
}:
# This file contains an extra mapping from Julia packages to the Python packages they depend on.
with lib;
rec {
packageMapping = {
ExcelFiles = ["xlrd"];
PyPlot = ["matplotlib"];
PythonPlot = ["matplotlib"];
SymPy = ["sympy"];
};
getExtraPythonPackages = names: concatMap (name: let
allCandidates = if hasAttr name packageMapping then getAttr name packageMapping else [];
in
filter (x: hasAttr x python3.pkgs) allCandidates
) names;
}

View file

@ -0,0 +1,63 @@
import Base: UUID
import Pkg.Artifacts: artifact_meta, artifact_names, find_artifacts_toml, load_artifacts_toml, select_downloadable_artifacts
import Pkg.BinaryPlatforms: AbstractPlatform, platform_key_abi, triplet
import Pkg.Operations: gen_build_code
import TOML
pkg_uuid = UUID(ARGS[1])
dir = ARGS[2]
artifacts_toml = find_artifacts_toml(dir)
if artifacts_toml == nothing
print("")
exit()
end
platform = platform_key_abi()
# Using collect_artifacts (from Pkg.jl) is more reliable than calling select_downloadable_artifacts directly.
# collect_artifacts includes support for .pkg/select_artifacts.jl, which may produce different results.
# If we use select_downloadable_artifacts here, then at depot build time it may try to download a different artifact
# and fail.
# However! The collect_artifacts from Pkg.jl doesn't allow us to pass lazy to select_downloadable_artifacts.
# So we have to paste our own version in here :(
function collect_artifacts(pkg_root::String; platform::AbstractPlatform)
# Check to see if this package has an (Julia)Artifacts.toml
artifacts_tomls = Tuple{String,Base.TOML.TOMLDict}[]
for f in artifact_names
artifacts_toml = joinpath(pkg_root, f)
if isfile(artifacts_toml)
selector_path = joinpath(pkg_root, ".pkg", "select_artifacts.jl")
# If there is a dynamic artifact selector, run that in an appropriate sandbox to select artifacts
if isfile(selector_path)
# Despite the fact that we inherit the project, since the in-memory manifest
# has not been updated yet, if we try to load any dependencies, it may fail.
# Therefore, this project inheritance is really only for Preferences, not dependencies.
select_cmd = Cmd(`$(gen_build_code(selector_path; inherit_project=true)) --startup-file=no $(triplet(platform))`)
meta_toml = String(read(select_cmd))
res = TOML.tryparse(meta_toml)
if res isa TOML.ParserError
errstr = sprint(showerror, res; context=stderr)
pkgerror("failed to parse TOML output from running $(repr(selector_path)), got: \n$errstr")
else
push!(artifacts_tomls, (artifacts_toml, TOML.parse(meta_toml)))
end
else
# Otherwise, use the standard selector from `Artifacts`
artifacts = select_downloadable_artifacts(artifacts_toml; platform, include_lazy=true)
push!(artifacts_tomls, (artifacts_toml, artifacts))
end
break
end
end
return artifacts_tomls
end
for (artifacts_toml, artifacts) in collect_artifacts(dir; platform)
TOML.print(artifacts)
end

View file

@ -0,0 +1,33 @@
import Base: UUID
import Pkg.Artifacts: artifact_meta, find_artifacts_toml, load_artifacts_toml
import Pkg.BinaryPlatforms: platform_key_abi
import TOML
pkg_uuid = UUID(ARGS[1])
dir = ARGS[2]
artifacts_toml = find_artifacts_toml(dir)
if artifacts_toml == nothing
print("")
exit()
end
platform = platform_key_abi()
# Older Julia doesn't provide select_downloadable_artifacts or .pkg/select_artifacts.jl,
# so gather the artifacts the old-fashioned way
artifact_dict = load_artifacts_toml(artifacts_toml; pkg_uuid=pkg_uuid)
results = Dict()
for name in keys(artifact_dict)
# Get the metadata about this name for the requested platform
meta = artifact_meta(name, artifact_dict, artifacts_toml; platform=platform)
# If there are no instances of this name for the desired platform, skip it
meta === nothing && continue
results[name] = meta
end
TOML.print(results)

View file

@ -0,0 +1,180 @@
{ lib
, julia
, python3
, runCommand
, augmentedRegistry
, packageNames
, packageOverrides
, packageImplications
}:
let
# The specific package resolution code depends on the Julia version
# These are pretty similar and could be combined to reduce duplication
resolveCode = if lib.versionOlder julia.version "1.7" then resolveCode1_6 else resolveCode1_8;
resolveCode1_6 = ''
import Pkg.API: check_package_name
import Pkg.Types: Context!, PRESERVE_NONE, manifest_info, project_deps_resolve!, registry_resolve!, stdlib_resolve!, ensure_resolved
import Pkg.Operations: _resolve, assert_can_add, is_dep, update_package_add
foreach(pkg -> check_package_name(pkg.name, :add), pkgs)
pkgs = deepcopy(pkgs) # deepcopy for avoid mutating PackageSpec members
Context!(ctx)
project_deps_resolve!(ctx, pkgs)
registry_resolve!(ctx, pkgs)
stdlib_resolve!(pkgs)
ensure_resolved(ctx, pkgs, registry=true)
assert_can_add(ctx, pkgs)
for (i, pkg) in pairs(pkgs)
entry = manifest_info(ctx, pkg.uuid)
pkgs[i] = update_package_add(ctx, pkg, entry, is_dep(ctx, pkg))
end
foreach(pkg -> ctx.env.project.deps[pkg.name] = pkg.uuid, pkgs)
pkgs, deps_map = _resolve(ctx, pkgs, PRESERVE_NONE)
'';
resolveCode1_8 = ''
import Pkg.API: handle_package_input!
import Pkg.Types: PRESERVE_NONE, project_deps_resolve!, registry_resolve!, stdlib_resolve!, ensure_resolved
import Pkg.Operations: _resolve, assert_can_add, update_package_add
foreach(handle_package_input!, pkgs)
# The handle_package_input! call above clears pkg.path, so we have to apply package overrides after
overrides = Dict{String, String}(${builtins.concatStringsSep ", " (lib.mapAttrsToList (name: path: ''"${name}" => "${path}"'') packageOverrides)})
println("Package overrides: ")
println(overrides)
for pkg in pkgs
if pkg.name in keys(overrides)
pkg.path = overrides[pkg.name]
end
end
project_deps_resolve!(ctx.env, pkgs)
registry_resolve!(ctx.registries, pkgs)
stdlib_resolve!(pkgs)
ensure_resolved(ctx, ctx.env.manifest, pkgs, registry=true)
assert_can_add(ctx, pkgs)
for (i, pkg) in pairs(pkgs)
entry = Pkg.Types.manifest_info(ctx.env.manifest, pkg.uuid)
is_dep = any(uuid -> uuid == pkg.uuid, [uuid for (name, uuid) in ctx.env.project.deps])
pkgs[i] = update_package_add(ctx, pkg, entry, is_dep)
end
foreach(pkg -> ctx.env.project.deps[pkg.name] = pkg.uuid, pkgs)
# Save the original pkgs for later. We might need to augment it with the weak dependencies
orig_pkgs = pkgs
pkgs, deps_map = _resolve(ctx.io, ctx.env, ctx.registries, pkgs, PRESERVE_NONE, ctx.julia_version)
if VERSION >= VersionNumber("1.9")
# Check for weak dependencies, which appear on the RHS of the deps_map but not in pkgs.
# Build up weak_name_to_uuid
uuid_to_name = Dict()
for pkg in pkgs
uuid_to_name[pkg.uuid] = pkg.name
end
weak_name_to_uuid = Dict()
for (uuid, deps) in pairs(deps_map)
for (dep_name, dep_uuid) in pairs(deps)
if !haskey(uuid_to_name, dep_uuid)
weak_name_to_uuid[dep_name] = dep_uuid
end
end
end
# If we have nontrivial weak dependencies, add each one to the initial pkgs and then re-run _resolve
if !isempty(weak_name_to_uuid)
println("Found weak dependencies: $(keys(weak_name_to_uuid))")
orig_uuids = Set([pkg.uuid for pkg in orig_pkgs])
for (name, uuid) in pairs(weak_name_to_uuid)
if uuid in orig_uuids
continue
end
pkg = PackageSpec(name, uuid)
push!(orig_uuids, uuid)
push!(orig_pkgs, pkg)
ctx.env.project.deps[name] = uuid
entry = Pkg.Types.manifest_info(ctx.env.manifest, uuid)
orig_pkgs[length(orig_pkgs)] = update_package_add(ctx, pkg, entry, false)
end
pkgs, deps_map = _resolve(ctx.io, ctx.env, ctx.registries, orig_pkgs, PRESERVE_NONE, ctx.julia_version)
end
end
'';
juliaExpression = packageNames: ''
import Pkg
Pkg.Registry.add(Pkg.RegistrySpec(path="${augmentedRegistry}"))
import Pkg.Types: Context, PackageSpec
input = ${lib.generators.toJSON {} packageNames}
if isfile("extra_package_names.txt")
append!(input, readlines("extra_package_names.txt"))
end
input = unique(input)
println("Resolving packages: " * join(input, " "))
pkgs = [PackageSpec(pkg) for pkg in input]
ctx = Context()
${resolveCode}
open(ENV["out"], "w") do io
for spec in pkgs
println(io, "- name: " * spec.name)
println(io, " uuid: " * string(spec.uuid))
println(io, " version: " * string(spec.version))
if endswith(spec.name, "_jll") && haskey(deps_map, spec.uuid)
println(io, " depends_on: ")
for (dep_name, dep_uuid) in pairs(deps_map[spec.uuid])
println(io, " \"$(dep_name)\": \"$(dep_uuid)\"")
end
end
end
end
'';
in
runCommand "julia-package-closure.yml" { buildInputs = [julia (python3.withPackages (ps: with ps; [pyyaml]))]; } ''
mkdir home
export HOME=$(pwd)/home
echo "Resolving Julia packages with the following inputs"
echo "Julia: ${julia}"
echo "Registry: ${augmentedRegistry}"
# Prevent a warning where Julia tries to download package server info
export JULIA_PKG_SERVER=""
julia -e '${juliaExpression packageNames}';
# See if we need to add any extra package names based on the closure
# and the packageImplications
python ${./python}/find_package_implications.py "$out" '${lib.generators.toJSON {} packageImplications}' extra_package_names.txt
if [ -f extra_package_names.txt ]; then
echo "Re-resolving with additional package names"
julia -e '${juliaExpression packageNames}';
fi
''

View file

@ -0,0 +1,59 @@
# This file based on a ChatGPT reponse for the following prompt:
# "can you write code in python to build up a DAG representing
# a dependency tree, and then a function that can return all the
# dependencies of a given node?"
class Node:
def __init__(self, name):
self.name = name
self.dependencies = set()
class DAG:
def __init__(self):
self.nodes = {}
def add_node(self, node_name, dependencies=None):
if node_name in self.nodes:
raise ValueError(f"Node '{node_name}' already exists in the graph.")
node = Node(node_name)
if dependencies:
node.dependencies.update(dependencies)
self.nodes[node_name] = node
def add_dependency(self, node_name, dependency_name):
if node_name not in self.nodes:
raise ValueError(f"Node '{node_name}' does not exist in the graph.")
if dependency_name not in self.nodes:
raise ValueError(f"Dependency '{dependency_name}' does not exist in the graph.")
self.nodes[node_name].dependencies.add(dependency_name)
def get_dependencies(self, node_name):
if node_name not in self.nodes:
raise ValueError(f"Node '{node_name}' does not exist in the graph.")
node = self.nodes[node_name]
dependencies = set()
def traverse_dependencies(current_node):
for dependency in current_node.dependencies:
dependencies.add(dependency)
if dependency in self.nodes:
traverse_dependencies(self.nodes[dependency])
traverse_dependencies(node)
return dependencies
def has_node(self, node_name):
return node_name in self.nodes
def __str__(self):
graph_str = ""
for node_name, node in self.nodes.items():
graph_str += f"{node_name} -> {', '.join(node.dependencies)}\n"
return graph_str

View file

@ -0,0 +1,14 @@
import json
from pathlib import Path
import sys
import toml
overrides_path = Path(sys.argv[1])
out_path = Path(sys.argv[2])
with open(overrides_path, "r") as f:
overrides = json.loads(f.read())
with open(out_path, "w") as f:
toml.dump(overrides, f)

View file

@ -0,0 +1,99 @@
import json
from pathlib import Path
import multiprocessing
import subprocess
import sys
import toml
import yaml
import dag
dependencies_path = Path(sys.argv[1])
closure_yaml_path = Path(sys.argv[2])
julia_path = Path(sys.argv[3])
extract_artifacts_script = Path(sys.argv[4])
extra_libs = json.loads(sys.argv[5])
out_path = Path(sys.argv[6])
with open(dependencies_path, "r") as f:
dependencies = yaml.safe_load(f)
dependency_uuids = dependencies.keys()
with open(closure_yaml_path, "r") as f:
# Build up a map of UUID -> closure information
closure_yaml_list = yaml.safe_load(f) or []
closure_yaml = {}
for item in closure_yaml_list:
closure_yaml[item["uuid"]] = item
# Build up a dependency graph of UUIDs
closure_dependencies_dag = dag.DAG()
for uuid, contents in closure_yaml.items():
if contents.get("depends_on"):
closure_dependencies_dag.add_node(uuid, dependencies=contents["depends_on"].values())
with open(out_path, "w") as f:
f.write("{ lib, fetchurl, glibc, pkgs, stdenv }:\n\n")
f.write("rec {\n")
def process_item(item):
uuid, src = item
lines = []
artifacts = toml.loads(subprocess.check_output([julia_path, extract_artifacts_script, uuid, src]).decode())
if not artifacts: return f' uuid-{uuid} = {{}};\n'
lines.append(f' uuid-{uuid} = {{')
for artifact_name, details in artifacts.items():
if len(details["download"]) == 0: continue
download = details["download"][0]
url = download["url"]
sha256 = download["sha256"]
git_tree_sha1 = details["git-tree-sha1"]
depends_on = set()
if closure_dependencies_dag.has_node(uuid):
depends_on = set(closure_dependencies_dag.get_dependencies(uuid)).intersection(dependency_uuids)
other_libs = extra_libs.get(uuid, [])
fixup = f"""fixupPhase = let
libs = lib.concatMap (lib.mapAttrsToList (k: v: v.path))
[{" ".join(["uuid-" + x for x in depends_on])}];
in ''
find $out -type f -executable -exec \
patchelf --set-rpath \$ORIGIN:\$ORIGIN/../lib:${{lib.makeLibraryPath (["$out" glibc] ++ libs ++ (with pkgs; [{" ".join(other_libs)}]))}} {{}} \;
find $out -type f -executable -exec \
patchelf --set-interpreter ${{glibc}}/lib/ld-linux-x86-64.so.2 {{}} \;
''"""
derivation = f"""{{
name = "{artifact_name}";
src = fetchurl {{
url = "{url}";
sha256 = "{sha256}";
}};
sourceRoot = ".";
dontConfigure = true;
dontBuild = true;
installPhase = "cp -r . $out";
{fixup};
}}"""
lines.append(f""" "{artifact_name}" = {{
sha1 = "{git_tree_sha1}";
path = stdenv.mkDerivation {derivation};
}};\n""")
lines.append(' };\n')
return "\n".join(lines)
with multiprocessing.Pool(10) as pool:
for s in pool.map(process_item, dependencies.items()):
f.write(s)
f.write(f"""
}}\n""")

View file

@ -0,0 +1,24 @@
import json
import os
from pathlib import Path
import subprocess
import sys
import yaml
dependencies_path = Path(sys.argv[1])
package_implications_json = sys.argv[2]
out_path = Path(sys.argv[3])
package_implications = json.loads(package_implications_json)
with open(dependencies_path) as f:
desired_packages = yaml.safe_load(f) or []
extra_package_names = []
for pkg in desired_packages:
if pkg["name"] in package_implications:
extra_package_names.extend(package_implications[pkg["name"]])
if len(extra_package_names) > 0:
with open(out_path, "w") as f:
f.write("\n".join(extra_package_names))

View file

@ -0,0 +1,22 @@
import json
from pathlib import Path
import sys
import toml
overrides_path = Path(sys.argv[1])
out_path = Path(sys.argv[2])
with open(overrides_path, "r") as f:
overrides = json.loads(f.read())
result = {}
for (uuid, artifacts) in overrides.items():
if len(artifacts) == 0: continue
for (name, info) in artifacts.items():
result[info["sha1"]] = info["path"]
with open(out_path, "w") as f:
toml.dump(result, f)

View file

@ -0,0 +1,98 @@
from collections import defaultdict
import copy
import json
import os
from pathlib import Path
import shutil
import subprocess
import sys
import tempfile
import toml
import util
import yaml
registry_path = Path(sys.argv[1])
desired_packages_path = Path(sys.argv[2])
package_overrides = json.loads(sys.argv[3])
dependencies_path = Path(sys.argv[4])
out_path = Path(sys.argv[5])
with open(desired_packages_path, "r") as f:
desired_packages = yaml.safe_load(f) or []
uuid_to_versions = defaultdict(list)
for pkg in desired_packages:
uuid_to_versions[pkg["uuid"]].append(pkg["version"])
with open(dependencies_path, "r") as f:
uuid_to_store_path = yaml.safe_load(f)
os.makedirs(out_path)
registry = toml.load(registry_path / "Registry.toml")
registry["packages"] = {k: v for k, v in registry["packages"].items() if k in uuid_to_versions}
for (uuid, versions) in uuid_to_versions.items():
if uuid in package_overrides:
info = package_overrides[uuid]
# Make a registry entry based on the info from the package override
path = Path(info["name"][0].upper()) / Path(info["name"])
registry["packages"][uuid] = {
"name": info["name"],
"path": str(path),
}
os.makedirs(out_path / path)
# Read the Project.yaml from the src
project = toml.load(Path(info["src"]) / "Project.toml")
# Generate all the registry files
with open(out_path / path / Path("Compat.toml"), "w") as f:
f.write('["%s"]\n' % info["version"])
# Write nothing in Compat.toml, because we've already resolved everything
with open(out_path / path / Path("Deps.toml"), "w") as f:
f.write('["%s"]\n' % info["version"])
toml.dump(project["deps"], f)
with open(out_path / path / Path("Versions.toml"), "w") as f:
f.write('["%s"]\n' % info["version"])
f.write('git-tree-sha1 = "%s"\n' % info["treehash"])
with open(out_path / path / Path("Package.toml"), "w") as f:
toml.dump({
"name": info["name"],
"uuid": uuid,
"repo": "file://" + info["src"],
}, f)
elif uuid in registry["packages"]:
registry_info = registry["packages"][uuid]
name = registry_info["name"]
path = registry_info["path"]
os.makedirs(out_path / path)
# Copy some files to the minimal repo unchanged
for f in ["Compat.toml", "Deps.toml"]:
if (registry_path / path / f).exists():
shutil.copy2(registry_path / path / f, out_path / path)
# Copy the Versions.toml file, trimming down to the versions we care about
all_versions = toml.load(registry_path / path / "Versions.toml")
versions_to_keep = {k: v for k, v in all_versions.items() if k in versions}
for k, v in versions_to_keep.items():
del v["nix-sha256"]
with open(out_path / path / "Versions.toml", "w") as f:
toml.dump(versions_to_keep, f)
# Fill in the local store path for the repo
if not uuid in uuid_to_store_path: continue
package_toml = toml.load(registry_path / path / "Package.toml")
package_toml["repo"] = "file://" + uuid_to_store_path[uuid]
with open(out_path / path / "Package.toml", "w") as f:
toml.dump(package_toml, f)
with open(out_path / "Registry.toml", "w") as f:
toml.dump(registry, f)

View file

@ -0,0 +1,67 @@
import json
from pathlib import Path
import re
import shutil
import sys
import toml
import util
import yaml
registry_path = Path(sys.argv[1])
package_overrides = json.loads(sys.argv[2])
desired_packages_path = Path(sys.argv[3])
out_path = Path(sys.argv[4])
with open(desired_packages_path, "r") as f:
desired_packages = yaml.safe_load(f) or []
registry = toml.load(registry_path / "Registry.toml")
def ensure_version_valid(version):
"""
Ensure a version string is a valid Julia-parsable version.
It doesn't really matter what it looks like as it's just used for overrides.
"""
return re.sub('[^0-9\.]','', version)
with open(out_path, "w") as f:
f.write("{fetchgit}:\n")
f.write("{\n")
for pkg in desired_packages:
uuid = pkg["uuid"]
if pkg["name"] in package_overrides:
treehash = util.get_commit_info(package_overrides[pkg["name"]])["tree"]
f.write(f""" "{uuid}" = {{
src = null; # Overridden: will fill in later
name = "{pkg["name"]}";
version = "{ensure_version_valid(pkg["version"])}";
treehash = "{treehash}";
}};\n""")
elif uuid in registry["packages"]:
registry_info = registry["packages"][uuid]
path = registry_info["path"]
packageToml = toml.load(registry_path / path / "Package.toml")
all_versions = toml.load(registry_path / path / "Versions.toml")
if not pkg["version"] in all_versions: continue
version_to_use = all_versions[pkg["version"]]
repo = packageToml["repo"]
f.write(f""" "{uuid}" = {{
src = fetchgit {{
url = "{repo}";
rev = "{version_to_use["git-tree-sha1"]}";
sha256 = "{version_to_use["nix-sha256"]}";
}};
name = "{pkg["name"]}";
version = "{pkg["version"]}";
treehash = "{version_to_use["git-tree-sha1"]}";
}};\n""")
else:
# print("Warning: couldn't figure out what to do with pkg in sources_nix.py", pkg)
pass
f.write("}")

View file

@ -0,0 +1,12 @@
import os
import subprocess
import tempfile
def get_commit_info(repo):
with tempfile.TemporaryDirectory() as home_dir:
env_with_home = os.environ.copy()
env_with_home["HOME"] = home_dir
subprocess.check_output(["git", "config", "--global", "--add", "safe.directory", repo], env=env_with_home)
lines = subprocess.check_output(["git", "log", "--pretty=raw"], cwd=repo, env=env_with_home).decode().split("\n")
return dict([x.split() for x in lines if len(x.split()) == 2])

View file

@ -0,0 +1,9 @@
{ fetchFromGitHub }:
fetchFromGitHub {
owner = "CodeDownIO";
repo = "General";
rev = "baf9e22ecdf97b6424a611ac4a565c6ee60d3f44";
sha256 = "1nd3x2z8r6578149pbpkx9qw2ajln1kfy7w5kjsnv56v180h0ddf";
# date = "2023-12-14T12:20:00+00:00";
}

View file

@ -0,0 +1,45 @@
{ git
, runCommand
}:
{
# Add packages to a Python environment. Works if you pass something like either
# a) python3
# b) python3.withPackages (ps: [...])
# See https://github.com/NixOS/nixpkgs/pull/97467#issuecomment-689315186
addPackagesToPython = python: packages:
if python ? "env" then python.override (old: {
extraLibs = old.extraLibs ++ packages;
})
else python.withPackages (ps: packages);
# Convert an ordinary source checkout into a repo with a single commit
repoifySimple = name: path:
runCommand ''${name}-repoified'' {buildInputs = [git];} ''
mkdir -p $out
cp -r ${path}/. $out
cd $out
chmod -R u+w .
rm -rf .git
git init
git add . -f
git config user.email "julia2nix@localhost"
git config user.name "julia2nix"
git commit -m "Dummy commit"
'';
# Convert an dependency source info into a repo with a single commit
repoifyInfo = uuid: info:
runCommand ''julia-${info.name}-${info.version}'' {buildInputs = [git];} ''
mkdir -p $out
cp -r ${info.src}/. $out
cd $out
chmod -R u+w .
rm -rf .git
git init
git add . -f
git config user.email "julia2nix@localhost"
git config user.name "julia2nix"
git commit -m "Dummy commit"
'';
}

View file

@ -1,14 +1,12 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost, gmp, mpfr }:
{ lib, stdenv, fetchurl, fetchpatch, cmake, boost, gmp, mpfr }:
stdenv.mkDerivation rec {
version = "4.14.2";
version = "4.14.3";
pname = "cgal";
src = fetchFromGitHub {
owner = "CGAL";
repo = "releases";
rev = "CGAL-${version}";
sha256 = "1p1xyws2s9h2c8hlkz1af4ix48qma160av24by6lcm8al1g44pca";
src = fetchurl {
url = "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-${version}/CGAL-${version}.tar.xz";
hash = "sha256-W6/nq+hDW+yhehCCBi02M2jsHj8NZYG7DaiwEPs4n+Q=";
};
patches = [

View file

@ -18,7 +18,8 @@
, Cocoa
, AGL
, OpenGL
, withCuda ? false, cudatoolkit
, config
, withCuda ? config.cudaSupport, cudaPackages
}:
stdenv.mkDerivation rec {
@ -38,7 +39,13 @@ stdenv.mkDerivation rec {
sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
'';
nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
nativeBuildInputs = [
pkg-config
cmake
wrapQtAppsHook
]
++ lib.optionals withCuda [ cudaPackages.cuda_nvcc ];
buildInputs = [
eigen
libusb1
@ -46,8 +53,7 @@ stdenv.mkDerivation rec {
qtbase
libXt
]
++ lib.optionals stdenv.isDarwin [ Cocoa AGL ]
++ lib.optionals withCuda [ cudatoolkit ];
++ lib.optionals stdenv.isDarwin [ Cocoa AGL ];
propagatedBuildInputs = [
boost

View file

@ -21,13 +21,13 @@ let
in stdenv.mkDerivation rec {
pname = "avogadrolibs";
version = "1.97.0";
version = "1.98.1";
src = fetchFromGitHub {
owner = "OpenChemistry";
repo = pname;
rev = version;
hash = "sha256-ZGFyUlFyI403aw/6GVze/gronT67XlEOKuw5sfHeVy8=";
hash = "sha256-BuBMWW7N5Cu9tw5Vpwk+aoIaMWwHViRzLtIG7XDWjN4=";
};
postUnpack = ''
@ -53,9 +53,13 @@ in stdenv.mkDerivation rec {
qttools
];
postFixup = ''
# Fix the broken CMake files to use the correct paths
postInstall = ''
substituteInPlace $out/lib/cmake/${pname}/AvogadroLibsConfig.cmake \
--replace "''${AvogadroLibs_INSTALL_PREFIX}/$out" "''${AvogadroLibs_INSTALL_PREFIX}"
--replace "$out/" ""
substituteInPlace $out/lib/cmake/${pname}/AvogadroLibsTargets.cmake \
--replace "_IMPORT_PREFIX}/$out" "_IMPORT_PREFIX}/"
'';
meta = with lib; {

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "mmtf-cpp";
version = "1.0.0";
version = "1.1.0";
src = fetchFromGitHub {
owner = "rcsb";
repo = pname;
rev = "v${version}";
sha256= "17ylramda69plf5w0v5hxbl4ggkdi5s15z55cv0pljl12yvyva8l";
hash = "sha256-8JrNobvekMggS8L/VORKA32DNUdXiDrYMObjd29wQmc=";
};
nativeBuildInputs = [ cmake ];

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
owner = "OpenChemistry";
repo = pname;
rev = version;
sha256 = "+NoY8YVseFyBbxc3ttFWiQuHQyy1GN8zvV1jGFjmvLg=";
hash = "sha256-+NoY8YVseFyBbxc3ttFWiQuHQyy1GN8zvV1jGFjmvLg=";
};
nativeBuildInputs = [
@ -18,9 +18,10 @@ stdenv.mkDerivation rec {
buildInputs = [ qttools ];
postFixup = ''
substituteInPlace $out/lib/cmake/molequeue/MoleQueueConfig.cmake \
--replace "''${MoleQueue_INSTALL_PREFIX}/$out" "''${MoleQueue_INSTALL_PREFIX}"
# Fix the broken CMake files to use the correct paths
postInstall = ''
substituteInPlace $out/lib/cmake/${pname}/MoleQueueConfig.cmake \
--replace "$out/" ""
'';
meta = with lib; {

View file

@ -29,6 +29,9 @@ stdenv.mkDerivation rec {
IOKit
];
# Ensure the linker is using atomic when compiling for RISC-V, otherwise fails
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
# Some x86 tests are interrupted by signal 10
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86"

View file

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "adafruit-io";
version = "2.7.0";
version = "2.7.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "adafruit";
repo = "Adafruit_IO_Python";
rev = "refs/tags/${version}";
hash = "sha256-BIquSrhtRv2NEOn/G6TTfYMrL2OBwwJQYZ455fznwdU=";
hash = "sha256-vfjyU+czLtUA0WDEvc0iYmJ2Tn75o/OsX909clfDsUE=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -7,15 +7,15 @@
buildPythonPackage rec {
pname = "adafruit-platformdetect";
version = "3.56.0";
format = "pyproject";
version = "3.57.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "Adafruit-PlatformDetect";
inherit version;
hash = "sha256-PApfNjW7sfVmYT0NcEKs5MZJG65P7WQ5WVpQuOj8EV4=";
hash = "sha256-tw95VnxsK57KBMw0fzzgJnFe8O8Ef0rQ9qBMIeYrkHQ=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -15,23 +15,18 @@
buildPythonPackage rec {
pname = "aioambient";
version = "2023.10.1";
format = "pyproject";
version = "2023.12.0";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
repo = "aioambient";
rev = "refs/tags/${version}";
hash = "sha256-Q7jb0tJsbVM2vEqKgjXOWJN2OwR9qLchU/4ShOUGPT4=";
hash = "sha256-O9MlXtX7UzFN1w/vxpcZ/nRPDFPK5wFKBl42rhaAu94=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'websockets = ">=11.0.1"' 'websockets = "*"'
'';
nativeBuildInputs = [
poetry-core
];

View file

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "aiocomelit";
version = "0.6.2";
version = "0.7.0";
format = "pyproject";
disabled = pythonOlder "3.10";
@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "chemelli74";
repo = "aiocomelit";
rev = "refs/tags/v${version}";
hash = "sha256-Pqds4RwDxaUyZUIGTK0JOjsKbyB7j3uOfunbLXsKANk=";
hash = "sha256-xUtLRHNsv1q6QV6dYsS2OBQj/HsiZDfPhqMPDwNKS7A=";
};
postPatch = ''

View file

@ -8,7 +8,7 @@
buildPythonPackage rec {
pname = "aiolyric";
version = "1.1.0";
version = "1.1.1";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -17,7 +17,7 @@ buildPythonPackage rec {
owner = "timmo001";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-LDLpNuwkoPacI/a2NSlqUABRgwy+jAjGwOxmShLskso=";
hash = "sha256-FZhLjVrLzLv6CZz/ROlvbtBK9XnpO8pG48aSIoBxhCo=";
};
propagatedBuildInputs = [

View file

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "aiooss2";
version = "0.2.7";
version = "0.2.8";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "karajan1001";
repo = "aiooss2";
rev = "refs/tags/${version}";
hash = "sha256-eMmJpX7bjX5r6GW9N5KmLQpo5V8i6F95TfInct34a2g=";
hash = "sha256-PwgbUZAuk2woEmLYDdWF5hTs19DASxxUv3Ga844ai7g=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "aiorecollect";
version = "2023.11.0";
version = "2023.12.0";
format = "pyproject";
disabled = pythonOlder "3.9";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-CRiYde3FKVXhqB3W5rD7T3v93PAcsXBj0gG0L0umHSg=";
hash = "sha256-Rj0+r7eERLY5VzmuDQH/TeVLfmvmKwPqcvd1b/To0Ts=";
};
postPatch = ''

View file

@ -17,7 +17,7 @@
buildPythonPackage rec {
pname = "aioridwell";
version = "2023.10.0";
version = "2023.12.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = "bachya";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-psynooRbX34EFYY7FTqy3KdFsv939z/qYfIfyNTVkiM=";
hash = "sha256-Lg5O9xwEEgGFIrQoS4r4EMmYDX3yAkcMwHNMHMhLapI=";
};
nativeBuildInputs = [

View file

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "aiortm";
version = "0.8.6";
version = "0.8.7";
pyproject = true;
disabled = pythonOlder "3.9";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "MartinHjelmare";
repo = "aiortm";
rev = "refs/tags/v${version}";
hash = "sha256-bchfFtggmKXjAVTeFFy+3YXF3PCfAcFPC5fanw3l/RE=";
hash = "sha256-rWULiyQGBA01hWfRDulDuHX0c1LPo6CTZ9HFOn3MD+E=";
};
postPatch = ''

View file

@ -17,7 +17,7 @@
buildPythonPackage rec {
pname = "appthreat-vulnerability-db";
version = "5.5.4";
version = "5.5.6";
pyproject = true;
disabled = pythonOlder "3.7";
@ -26,7 +26,7 @@ buildPythonPackage rec {
owner = "AppThreat";
repo = "vulnerability-db";
rev = "refs/tags/v${version}";
hash = "sha256-LWlB7ZIcGoNXq6WodJE6hinGDBFgUqP4tXa51T5yI8c=";
hash = "sha256-jPbYbyVOfn5XCVdzLEEtMcRnGQzzHiea0GZ+YatswEM=";
};
postPatch = ''

View file

@ -65,7 +65,7 @@
}:
let
pname = "argilla";
version = "1.19.0";
version = "1.20.0";
optional-dependencies = {
server = [
fastapi
@ -126,7 +126,7 @@ buildPythonPackage {
owner = "argilla-io";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Idl5Tm1XWgBLVgHPbXiyt9MW4J5wZdPb2J7iIDBnorg=";
hash = "sha256-LYtudVk4FJMMCMDwCW38DBFsHA2xGd2ScvXogy6zRdI=";
};
pythonRelaxDeps = [

View file

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "asana";
version = "4.0.11";
version = "5.0.3";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -19,8 +19,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "asana";
repo = "python-asana";
rev = "refs/tags/${version}";
hash = "sha256-B98X8ErmoMIpXu4KKvRGgtElPs/va2+UIR+ARUgafgo=";
rev = "refs/tags/v${version}";
hash = "sha256-9F63DvwMh9NwlTqFuhiXfgRRRxAFjjRYmYzsuOhlQJ0=";
};
propagatedBuildInputs = [

View file

@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "asf-search";
version = "6.7.1";
version = "6.7.2";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "asfadmin";
repo = "Discovery-asf_search";
rev = "refs/tags/v${version}";
hash = "sha256-Gks2PsHqwQqH6CcLc9yF2eAeOwncCPzEphbvR2t3j3Q=";
hash = "sha256-cgd+OrBhMCc0UAYF1y5FiUSuKf3l3/7i8Y6JjhWnR0M=";
};
propagatedBuildInputs = [

View file

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "asyncsleepiq";
version = "1.3.7";
version = "1.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-nKXZXOpwVN8Xe1vwwPGPucvyffiIQ8I4D+0A3qGco5w=";
hash = "sha256-H5Zg1I7+/vG5U9Tnr/qXVg/tTPMtuCWQGfEgug9ehEM=";
};
propagatedBuildInputs = [

View file

@ -15,16 +15,16 @@
buildPythonPackage rec {
pname = "auth0-python";
version = "4.6.1";
format = "pyproject";
version = "4.7.0";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "auth0";
repo = "auth0-python";
rev = "refs/tags/${version}";
hash = "sha256-weXEwrOP+TKVwhqCeFVqUw4x+q2Wplr0QWVUzpbNPSc=";
hash = "sha256-Z89T0HXB66MZTYNKSK8fHunUBFuI1wT5jcy+P3+9tIk=";
};
nativeBuildInputs = [

View file

@ -20,14 +20,14 @@
buildPythonPackage rec {
pname = "authcaptureproxy";
version = "1.3.0";
version = "1.3.2";
pyproject = true;
src = fetchFromGitHub {
owner = "alandtse";
repo = "auth_capture_proxy";
rev = "refs/tags/v${version}";
hash = "sha256-qkvr8uYI6+lbNsAPw2PAnPyWRQTE4AEHf3djBfSp3XU=";
hash = "sha256-gdu0Ror/epu6huTEpBrqHD62O9uaL6273pKnpqPKskc=";
};
nativeBuildInputs = [

View file

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "aws-lambda-builders";
version = "1.43.0";
version = "1.44.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "awslabs";
repo = "aws-lambda-builders";
rev = "refs/tags/v${version}";
hash = "sha256-rwyhcoVVMdSmv/YqUk/sR4EMSRJHHB99v7aE8P4l8wE=";
hash = "sha256-97NhNlYaxBwUdBmg6qzpGdtGyE86rO/PXl9pDfyitbI=";
};
postPatch = ''

View file

@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "azure-mgmt-compute";
version = "30.3.0";
version = "30.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-5Sl4Y0D4YqpqIYp61qW+trn7VYM8XKoIUcwzFNBJO2M=";
hash = "sha256-C3Qo/YvRXHy9fGa5uwEOClyzeoBs7x9JSNkHGRV2kzQ=";
};
propagatedBuildInputs = [

View file

@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "azure-mgmt-network";
version = "25.1.0";
version = "25.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-+Tn3W/E54D0sRXpPB6XrrbWv/dcKpUvpoK9EuOUhMvw=";
hash = "sha256-EUxCktIjsdHiR7Qa9luNWjeTVn5q2/ojB3IFUiP0GCo=";
};
propagatedBuildInputs = [

View file

@ -363,12 +363,12 @@
buildPythonPackage rec {
pname = "boto3-stubs";
version = "1.29.7";
version = "1.34.2";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-PrVsWs8ESCmq3eAj1Ox3WPzByx0S6Uy0vIL20HvAruM=";
hash = "sha256-PNsE3SPM9k8La03h+d9wNRskjzMy4uaDEFVf+MefaZU=";
};
propagatedBuildInputs = [

View file

@ -9,7 +9,7 @@
buildPythonPackage rec {
pname = "botocore-stubs";
version = "1.33.8";
version = "1.34.2";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -17,7 +17,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "botocore_stubs";
inherit version;
hash = "sha256-A1b/D8kY2N74vfx4UjeR60zlXCVcHr5JuhBeFoyBfc0=";
hash = "sha256-+2DKdWGyqdHdq9xe65YRKy+Xjd+mopS74x0r/1pOZYo=";
};
nativeBuildInputs = [

View file

@ -18,8 +18,8 @@
buildPythonPackage rec {
pname = "censys";
version = "2.2.9";
format = "pyproject";
version = "2.2.10";
pyproject = true;
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "censys";
repo = "censys-python";
rev = "refs/tags/v${version}";
hash = "sha256-Q6Ii2fsJYNABhuaRK4nZ6bjjvNsoIcgNVFBXdBgTXIo=";
hash = "sha256-rjLTEaHSBB6igffNGt4qJZeSyIn1Cc1ZGEGfEoMj7OQ=";
};
nativeBuildInputs = [

View file

@ -6,12 +6,12 @@
buildPythonPackage rec {
pname = "confight";
version = "1.3.1";
version = "2.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-fJr7f9Y/zEpCedWYd04AMuhkOFqZLJOw4sDiz8SDQ/Y=";
hash = "sha256-iodoexnh9tG4dgkjDXCUzWRFDhRlJ3HRgaNhxG2lwPY=";
};
propagatedBuildInputs = [

View file

@ -11,7 +11,7 @@
buildPythonPackage rec {
pname = "dvc-http";
version = "2.30.2";
version = "2.32.0";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "iterative";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-IlgJEnS+rHSg5cw7SCc3vVtG1mJA5voGViya7nkpL2M=";
hash = "sha256-ru/hOFv/RcS/7SBpTJU8xFxdllmaiH4dV1ouS6GGKkY=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View file

@ -5,7 +5,7 @@
, boost
, eigen
, gmp
, cgal_5 # see https://github.com/NixOS/nixpkgs/pull/94875 about cgal
, cgal # see https://github.com/NixOS/nixpkgs/pull/94875 about cgal
, mpfr
, tbb
, numpy
@ -33,7 +33,7 @@ buildPythonPackage rec {
patches = [ ./remove_explicit_PYTHONPATH.patch ];
nativeBuildInputs = [ cmake numpy cython pybind11 matplotlib ];
buildInputs = [ boost eigen gmp cgal_5 mpfr ]
buildInputs = [ boost eigen gmp cgal mpfr ]
++ lib.optionals enableTBB [ tbb ];
propagatedBuildInputs = [ numpy scipy ];
nativeCheckInputs = [ pytest ];

View file

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "minidump";
version = "0.0.22";
version = "0.0.23";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-PPvvvHz3WA67Vn2P7MIY+ChkjXrCOuTgj0KXr4B2mZ0=";
hash = "sha256-R+tza5C/2egkajScmilp/8qowoSklYVfEB+f0KMNBqQ=";
};
nativeBuildInputs = [

View file

@ -1,7 +1,7 @@
{ lib, buildGoModule, fetchFromGitLab, fetchurl, bash }:
let
version = "16.6.0";
version = "16.6.1";
in
buildGoModule rec {
inherit version;
@ -23,7 +23,7 @@ buildGoModule rec {
owner = "gitlab-org";
repo = "gitlab-runner";
rev = "v${version}";
sha256 = "sha256-4N00+yO7Ps0+jy7WmHhm4Eh4MXt3beH00ScZ1RWNByE=";
sha256 = "sha256-z/W4mqC6524ocBR0c2UpMrlo5njXoewgBOulPoe2UBY=";
};
patches = [

View file

@ -5,16 +5,16 @@
buildGoModule rec {
pname = "act";
version = "0.2.55";
version = "0.2.56";
src = fetchFromGitHub {
owner = "nektos";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-OFtzqnXKj03papfBDQlgUonOA7eKGWDJeVZmfFkPUcc=";
hash = "sha256-Lco14Zwnad9AlujmPwhT5zRhsrifbQ3oi0AftjqsUQk=";
};
vendorHash = "sha256-45UPm7ThTSRTgzaD4tXoTaeT4hRlMKn01mvgJS1I7zI=";
vendorHash = "sha256-rQCxRUIzTJtL8gC9nYV+HKzB7hozyR24TCb+1y/qKM4=";
doCheck = false;

View file

@ -23,6 +23,7 @@ stdenv.mkDerivation rec {
description = "A front-end for libsass";
homepage = "https://github.com/sass/sassc/";
license = licenses.mit;
mainProgram = "sassc";
maintainers = with maintainers; [ codyopel pjones ];
platforms = platforms.unix;
};

View file

@ -4,11 +4,10 @@ rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
libiconv,
jq,
moreutils,
CoreServices,
Security
SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
@ -24,7 +23,7 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = if stdenv.isDarwin
then [ libiconv CoreServices Security ]
then [ CoreServices SystemConfiguration ]
else [ openssl ];
# requires network
checkFlags = [ "--skip=tools::tests::download_and_install_binaries" ];

View file

@ -6,11 +6,11 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "aldente";
version = "1.24";
version = "1.24.1";
src = fetchurl {
url = "https://github.com/davidwernhart/aldente-charge-limiter/releases/download/${finalAttrs.version}/AlDente.dmg";
hash = "sha256-5byGKtVgKiE8m0+GXDtUpTwQpuUj4lv0hPOl4jhH9wk=";
hash = "sha256-vOv52SrUki2f9vGzYy8dhVJVxna2ZvhtG6WbKjCv3gA=";
};
dontBuild = true;

View file

@ -81,6 +81,17 @@ rec {
useFabricmanager = true;
};
dc_535 = generic rec {
version = "535.129.03";
url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run";
sha256_64bit = "sha256-5tylYmomCMa7KgRs/LfBrzOLnpYafdkKwJu4oSb/AC4=";
persistencedSha256 = "sha256-FRMqY5uAJzq3o+YdM2Mdjj8Df6/cuUUAnh52Ne4koME=";
fabricmanagerSha256 = "sha256-5KRYS+JLVAhDkBn8Z7e0uJvULQy6dSpwnYsbBxw7Mxg=";
useSettings = false;
usePersistenced = true;
useFabricmanager = true;
};
# Update note:
# If you add a legacy driver here, also update `top-level/linux-kernels.nix`,
# adding to the `nvidia_x11_legacy*` entries.

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
pname = "fabricmanager";
version = fmver;
src = fetchurl {
url = "https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/" +
url = "https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/" +
"${sys}/${pname}-${sys}-${fmver}-archive.tar.xz";
inherit sha256;
};

View file

@ -63,7 +63,7 @@ assert versionOlder version "391" -> sha256_32bit != null;
assert useSettings -> settingsSha256 != null;
assert usePersistenced -> persistencedSha256 != null;
assert useFabricmanager -> fabricmanagerSha256 != null;
assert useFabricmanager -> !(useSettings || usePersistenced);
assert useFabricmanager -> !useSettings;
let
nameSuffix = optionalString (!libsOnly) "-${kernel.version}";

View file

@ -12,13 +12,13 @@
}:
let
version = "1.11.0";
version = "1.11.1";
src = fetchFromGitHub {
owner = "axllent";
repo = "mailpit";
rev = "v${version}";
hash = "sha256-+PtyoItn9Dwf7HU3OjzldqfYgdu0LatPmijXK3gAKYY=";
hash = "sha256-K/B2FRzAtVdXa+lTi0bhkHjBe0rbAc4yFNv9uNDvB4Y=";
};
# Separate derivation, because if we mix this in buildGoModule, the separate
@ -30,7 +30,7 @@ let
npmDeps = fetchNpmDeps {
inherit src;
hash = "sha256-zx6B6kDVdKJMQQPONC/KWRXK2i+4l5w9hzrAqatrKTE=";
hash = "sha256-2WA4mqY/bO/K3m19T5/xGbUbcR95DXQnywkjjzstmd4=";
};
env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) {
@ -56,7 +56,7 @@ buildGoModule {
pname = "mailpit";
inherit src version;
vendorHash = "sha256-UQms3YWXJRP1u1ERlsFNpo6ei86qaH6pgfvCLnB3AAk=";
vendorHash = "sha256-1go3lkNaar9HSjJxKqqR+RII7V7Ufj1gYLalxyvJaVE=";
CGO_ENABLED = 0;

View file

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "graphite-exporter";
version = "0.14.0";
version = "0.15.0";
src = fetchFromGitHub {
owner = "prometheus";
repo = "graphite_exporter";
rev = "v${version}";
hash = "sha256-UaflfU27GR8VK6AduPDBcQyO3u1uX6YlGP9O4LFwn9A=";
hash = "sha256-2u8grG5n0XkBS6zNxYrPyL+HP5/jEe/bXLt/1l759o4=";
};
vendorHash = "sha256-cIl35wbdPCQJLudXphMbjO2Ztd/H1clI43xaMU6T0D4=";
vendorHash = "sha256-wt2eDCNZAss3zSqvXeKTlsrPfj8pMXKWa3Yb33uuW0M=";
preCheck = let
skippedTests = [

View file

@ -6,17 +6,17 @@
buildGoModule rec {
pname = "influxdb_exporter";
version = "0.11.4";
version = "0.11.5";
rev = "v${version}";
src = fetchFromGitHub {
inherit rev;
owner = "prometheus";
repo = "influxdb_exporter";
hash = "sha256-q6Pe7rw5BP1IUdokwlTqjiz2nB8+pC6u9al164EgAbM=";
hash = "sha256-5jKwUuM3JL0zzXFesXTUBNMkA7bhd37BhqxZ/RzG20Q=";
};
vendorHash = "sha256-sU2jxmXuSN5D+btjzUU51WXWxmj+2Qqp28NQvEyIUbM=";
vendorHash = "sha256-VQ8MkzT8caPR1gpLXvNzWD5/pO0IKw8d+bT8gohAiJo=";
ldflags = [
"-s"

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "nut-exporter";
version = "3.0.0";
version = "3.1.1";
src = fetchFromGitHub {
owner = "DRuggeri";
repo = "nut_exporter";
rev = "v${version}";
sha256 = "sha256-Y8G8nFhZ9Onxx40DJSTi0rnef8ulNTkj4bsPfqylOjQ=";
sha256 = "sha256-izD2Ks29/4/FBsZoH0raFzqb0DgPR8hXRYBZQEvET+s=";
};
vendorHash = "sha256-DGCNYklINPPzC7kCdEUS7TqVvg2SnKFqe0qHs5RSmzY=";

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