Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2024-08-10 18:01:31 +00:00 committed by GitHub
commit 9e4697663f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
73 changed files with 958 additions and 597 deletions

View File

@ -19724,6 +19724,12 @@
githubId = 32478597; githubId = 32478597;
name = "Subin Kim"; name = "Subin Kim";
}; };
sugar700 = {
email = "sugar@sylveon.social";
github = "sugar700";
githubId = 168804988;
name = "sugar";
};
suhr = { suhr = {
email = "suhr@i2pmail.org"; email = "suhr@i2pmail.org";
github = "suhr"; github = "suhr";

View File

@ -135,6 +135,10 @@
Processes also now run as a dynamically allocated user by default instead of Processes also now run as a dynamically allocated user by default instead of
root. root.
- `singularity-tools` have the `storeDir` argument removed from its override interface and use `builtins.storeDir` instead.
- Two build helpers in `singularity-tools`, i.e., `mkLayer` and `shellScript`, are deprecated, as they are no longer involved in image-building. Maintainers will remove them in future releases.
- The `budgie` and `budgiePlugins` scope have been removed and their packages - The `budgie` and `budgiePlugins` scope have been removed and their packages
moved into the top level scope (i.e., `budgie.budgie-desktop` is now moved into the top level scope (i.e., `budgie.budgie-desktop` is now
`budgie-desktop`) `budgie-desktop`)

View File

@ -57,7 +57,6 @@ in
environment = { environment = {
PRODUCTION = "true"; PRODUCTION = "true";
ALEMBIC_CONFIG_FILE="${pkg}/config/alembic.ini";
API_PORT = toString cfg.port; API_PORT = toString cfg.port;
BASE_URL = "http://localhost:${toString cfg.port}"; BASE_URL = "http://localhost:${toString cfg.port}";
DATA_DIR = "/var/lib/mealie"; DATA_DIR = "/var/lib/mealie";

View File

@ -29,13 +29,13 @@ let
in in
melpaBuild { melpaBuild {
pname = "lsp-bridge"; pname = "lsp-bridge";
version = "0-unstable-2024-07-27"; version = "0-unstable-2024-08-06";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "manateelazycat"; owner = "manateelazycat";
repo = "lsp-bridge"; repo = "lsp-bridge";
rev = "92d58ff0fb938ced513d690e0daadef74737e5d4"; rev = "49b5497243873b1bddea09a4a988e3573ed7cc3e";
hash = "sha256-qeoKPwK3qKcvUFchaQYCCQmSlXgN+Tt2kU+lXqiUwaw="; hash = "sha256-bGO5DjsetInDyGDHog5QJtAgz499kJEj52iWYIzdp5Y=";
}; };
patches = [ patches = [

View File

@ -24,7 +24,7 @@ in
rm "$out/bin/kak" rm "$out/bin/kak"
makeWrapper "${kakoune}/bin/kak" "$out/bin/kak" \ makeWrapper "${kakoune}/bin/kak" "$out/bin/kak" \
--set KAKOUNE_RUNTIME "$out/share/kak" \ --set KAKOUNE_RUNTIME "$out/share/kak" \
--set PATH "$PATH:$out/share/kak/bin" --suffix PATH : "$out/share/kak/bin"
# currently kakoune ignores doc files if they are symlinks, so workaround by # currently kakoune ignores doc files if they are symlinks, so workaround by
# copying doc files over, so they become regular files... # copying doc files over, so they become regular files...

View File

@ -1054,6 +1054,10 @@
''; '';
}; };
markview-nvim = super.markview-nvim.overrideAttrs {
dependencies = with self; [ nvim-web-devicons ];
};
mason-lspconfig-nvim = super.mason-lspconfig-nvim.overrideAttrs { mason-lspconfig-nvim = super.mason-lspconfig-nvim.overrideAttrs {
dependencies = with self; [ mason-nvim nvim-lspconfig ]; dependencies = with self; [ mason-nvim nvim-lspconfig ];
}; };

View File

@ -8,16 +8,16 @@
buildGoModule rec { buildGoModule rec {
pname = "nwg-dock"; pname = "nwg-dock";
version = "0.3.9"; version = "0.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nwg-piotr"; owner = "nwg-piotr";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-/iUtVym+fNnbBeLlrYIiO5tV9eeAVBh6Nw+d3GCJ/F8="; sha256 = "sha256-qmzCjbWmrDJBB2gnhR5hc0sYD3V0i/SKTavfMA2iLyc=";
}; };
vendorHash = "sha256-GW+shKOCwU8yprEfBeAPx1RDgjA7cZZzXDG112bdZ6k="; vendorHash = "sha256-paRcBQwg2uGouMRX5XF++OyN8Y0JyucXLN0G5O0j3qA=";
ldflags = [ "-s" "-w" ]; ldflags = [ "-s" "-w" ];

View File

@ -20,13 +20,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "otpclient"; pname = "otpclient";
version = "4.0.0"; version = "4.0.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "paolostivanin"; owner = "paolostivanin";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-Ah1TWRxLFKgSDjnLO5XLIyo1hgD7EAlMHDbxxcOu4Yg="; hash = "sha256-lSGXxwtys3V8dDTAW7l7+9VlF9tZQnWqNaV8neBvMRg=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pdfsam-basic"; pname = "pdfsam-basic";
version = "5.2.3"; version = "5.2.4";
src = fetchurl { src = fetchurl {
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb"; url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
hash = "sha256-ai1UHMeLvCba6WV6f6dGc53CxPP7bJaPgo8Tm7ddkOM="; hash = "sha256-xtkp5OCxzLx0ZNeYlwLQWudzsILErlrAHacuq4hOL8E=";
}; };
unpackPhase = '' unpackPhase = ''

View File

@ -1,34 +0,0 @@
{ lib, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "zk-shell";
version = "1.0.0";
src = fetchFromGitHub {
owner = "rgs1";
repo = "zk_shell";
rev = "v${version}";
sha256 = "0zisvvlclsf4sdh7dpqcl1149xbxw6pi1aqcwjbqblgf8m4nm0c7";
};
propagatedBuildInputs = with python3Packages; [
ansi
kazoo
nose
six
tabulate
twitter
];
# requires a running zookeeper, don't know how to fix that for the moment
doCheck = false;
meta = with lib; {
description = "Powerful & scriptable shell for Apache ZooKeeper";
mainProgram = "zk-shell";
homepage = "https://github.com/rgs1/zk_shell";
license = licenses.asl20;
maintainers = [ maintainers.mahe ];
platforms = platforms.all;
};
}

View File

@ -27,11 +27,11 @@
version = "2024-06-06"; version = "2024-06-06";
}; };
ungoogled-patches = { ungoogled-patches = {
hash = "sha256-4LfYBqFQ/e/ePaOTSFBpELt0ilo/Vohwnwp8FvkfavU="; hash = "sha256-4iI+1mVMoI1xg2t+33PiYDsiuXw0v4oUbSbYX+I9Q7s=";
rev = "127.0.6533.88-1"; rev = "127.0.6533.99-1";
}; };
}; };
hash = "sha256-nZZ2yrVu+0TloMaM455bmyeoeVnfeGR3EGubAf8snNU="; hash = "sha256-VKPlcBfS6iw4E1nz0nYJLg273XmJ+RcGGktRbqQTTwQ=";
version = "127.0.6533.88"; version = "127.0.6533.99";
}; };
} }

View File

@ -2,12 +2,12 @@
let let
pname = "polypane"; pname = "polypane";
version = "20.1.1"; version = "20.1.2";
src = fetchurl { src = fetchurl {
url = "https://github.com/firstversionist/${pname}/releases/download/v${version}/${pname}-${version}.AppImage"; url = "https://github.com/firstversionist/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
name = "${pname}-${version}.AppImage"; name = "${pname}-${version}.AppImage";
sha256 = "sha256-2bofd/2Eu2jpyvp5l1/Q6QIY2t7xaIV+ZhneGG38dA0="; sha256 = "sha256-rdbx0ffI8MDGXArniFnqTpuLLMlihtXXQiZnxw5vq+c=";
}; };
appimageContents = appimageTools.extractType2 { appimageContents = appimageTools.extractType2 {

View File

@ -2,18 +2,18 @@
buildGoModule rec{ buildGoModule rec{
pname = "pinniped"; pname = "pinniped";
version = "0.32.0"; version = "0.33.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vmware-tanzu"; owner = "vmware-tanzu";
repo = "pinniped"; repo = "pinniped";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-ypl8P66SEoHpaqAgFA90bJmiVvH4SvymCMVz1o9x9mQ="; sha256 = "sha256-BcDUXu/p5BYPrisJJBcaAGHL0k7FHMRKj1/z6Bz9hLU=";
}; };
subPackages = "cmd/pinniped"; subPackages = "cmd/pinniped";
vendorHash = "sha256-Tl5o/ytwdGT0bSa8ep7YSaSMM9rk8+Zx1SFgFGh9u6k="; vendorHash = "sha256-quGhv2JpMseQps9qPvuJ6Jit8CxcSCOWYHG684whwl4=";
ldflags = [ "-s" "-w" ]; ldflags = [ "-s" "-w" ];

View File

@ -11,16 +11,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "twitch-tui"; pname = "twitch-tui";
version = "2.6.13"; version = "2.6.14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Xithrius"; owner = "Xithrius";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-VEcBPiekjiDjXYTz/gqjES8N77GgwPdWRUJJ3twLmgU="; hash = "sha256-a/tPRGqD6YBw1Ls28kJNxQYNMc8mUq8wLgSg0yiJR+U=";
}; };
cargoHash = "sha256-uhm6Z4oJ8w1tN3VDtCNF2/pixNLCXnaEg8yyUSTJRnM="; cargoHash = "sha256-MRbwA/riOECCv2/AzNIma9sMAyRrEDb6HDOaGVDxr1Q=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config

View File

@ -48,23 +48,23 @@ let
# and often with different versions. We write them on three lines # and often with different versions. We write them on three lines
# like this (rather than using {}) so that the updater script can # like this (rather than using {}) so that the updater script can
# find where to edit them. # find where to edit them.
versions.aarch64-darwin = "6.1.1.36333"; versions.aarch64-darwin = "6.1.6.37851";
versions.x86_64-darwin = "6.1.1.36333"; versions.x86_64-darwin = "6.1.6.37851";
versions.x86_64-linux = "6.1.1.443"; versions.x86_64-linux = "6.1.6.1013";
srcs = { srcs = {
aarch64-darwin = fetchurl { aarch64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64"; url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
name = "zoomusInstallerFull.pkg"; name = "zoomusInstallerFull.pkg";
hash = "sha256-CBBJAa7hnz0I2ctEn7DMdzeXEs4x+aEmEr+L42ddqXE="; hash = "sha256-wsatsfVQElWXMZKZOVeqVBBE7ZRXx54OpA82ZzpymUI=";
}; };
x86_64-darwin = fetchurl { x86_64-darwin = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg"; url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
hash = "sha256-CHtyL/BdyBVCQOGWjP0H/5GJiq67hPNQxELlvzzUuts="; hash = "sha256-BTLEfVFrUQbb+LpGP93hMqGFWhKM3tBdKxDKe8GkhiA=";
}; };
x86_64-linux = fetchurl { x86_64-linux = fetchurl {
url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz"; url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
hash = "sha256-2FOAZ3MKusouuWvhxFEcqX+2e+PCF4N5zaz7mc9Mnq4="; hash = "sha256-mvCJft0suOxnwTkWWuH9OYKHwTMWx61ct10P5Q/EVBM=";
}; };
}; };

View File

@ -2,13 +2,13 @@
buildGoModule rec { buildGoModule rec {
pname = "git-credential-oauth"; pname = "git-credential-oauth";
version = "0.13.0"; version = "0.13.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hickford"; owner = "hickford";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-hCZZPbkbkZcR2xFTECQWJl2MvSu8MnOznadaj0nKfSo="; hash = "sha256-pJ1Snq79bQvhE+D7U8pMmK4YyvoZIwv29kr5640jpns=";
}; };
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
@ -19,7 +19,7 @@ buildGoModule rec {
"-X main.version=${version}" "-X main.version=${version}"
]; ];
vendorHash = "sha256-nbwrVihcH+ARLHylsjogsv3LVP+0+YtQ+7cozB7pAWo="; vendorHash = "sha256-ujsfEmDOOGCNErtBW5EyefQ+jXhfnAiwteYm8F7RLVE=";
postInstall = '' postInstall = ''
installManPage $src/git-credential-oauth.1 installManPage $src/git-credential-oauth.1

View File

@ -8,6 +8,8 @@
, after ? null , after ? null
, condition ? null , condition ? null
, phase ? "2" , phase ? "2"
, prependExtraArgs ? []
, appendExtraArgs ? []
}: }:
# the builder requires that # the builder requires that
@ -18,10 +20,17 @@ stdenv.mkDerivation {
name = "autostart-${name}"; name = "autostart-${name}";
priority = 5; priority = 5;
buildCommand = '' buildCommand = let
escapeArgs = args: lib.escapeRegex (lib.escapeShellArgs args);
prependArgs = lib.optionalString (prependExtraArgs != []) "${escapeArgs prependExtraArgs} ";
appendArgs = lib.optionalString (appendExtraArgs != []) " ${escapeArgs appendExtraArgs}";
in ''
mkdir -p $out/etc/xdg/autostart mkdir -p $out/etc/xdg/autostart
target=${name}.desktop target=${name}.desktop
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
${lib.optionalString (prependExtraArgs != [] || appendExtraArgs != []) ''
sed -i -r "s/(Exec=)([^ ]*) (.*)/\1\2 ${prependArgs}\3${appendArgs}/" $target
''}
chmod +rw $target chmod +rw $target
echo "X-KDE-autostart-phase=${phase}" >> $target echo "X-KDE-autostart-phase=${phase}" >> $target
${lib.optionalString (after != null) ''echo "${after}" >> $target''} ${lib.optionalString (after != null) ''echo "${after}" >> $target''}

View File

@ -5,44 +5,55 @@
runCommand, runCommand,
vmTools, vmTools,
writeClosure, writeClosure,
writers,
writeScript, writeScript,
# Native build inputs # Native build inputs
buildPackages,
e2fsprogs, e2fsprogs,
gawk,
util-linux, util-linux,
# Build inputs # Build inputs
bash, bashInteractive,
runtimeShell, runtimeShell,
singularity, singularity,
storeDir ? builtins.storeDir,
}: }:
rec {
shellScript =
name: text:
writeScript name ''
#!${runtimeShell}
set -e
${text}
'';
let
defaultSingularity = singularity;
in
rec {
# TODO(@ShamrockLee): Remove after Nixpkgs 24.11 branch-off.
shellScript =
lib.warn
"`singularity-tools.shellScript` is deprecated. Use `writeScript`, `writeShellScripts` or `writers.writeBash` instead."
(
name: text:
writeScript name ''
#!${runtimeShell}
set -e
${text}
''
);
# TODO(@ShamrockLee): Remove after Nixpkgs 24.11 branch-off.
mkLayer = mkLayer =
{ lib.warn
name, "`singularity-tools.mkLayer` is deprecated, as it is no longer used to implement `singularity-tools.buildImages`."
contents ? [ ], (
# May be "apptainer" instead of "singularity" {
projectName ? (singularity.projectName or "singularity"), name,
}: contents ? [ ],
runCommand "${projectName}-layer-${name}" { inherit contents; } '' # May be "apptainer" instead of "singularity"
mkdir $out projectName ? (singularity.projectName or "singularity"),
for f in $contents ; do }:
cp -ra $f $out/ runCommand "${projectName}-layer-${name}" { inherit contents; } ''
done mkdir $out
''; for f in $contents ; do
cp -ra $f $out/
done
''
);
buildImage = buildImage =
let
defaultSingularity = singularity;
in
{ {
name, name,
contents ? [ ], contents ? [ ],
@ -54,17 +65,23 @@ rec {
}: }:
let let
projectName = singularity.projectName or "singularity"; projectName = singularity.projectName or "singularity";
runAsRootFile = shellScript "run-as-root.sh" runAsRoot; runAsRootFile = buildPackages.writers.writeBash "run-as-root.sh" ''
runScriptFile = shellScript "run-script.sh" runScript; set -e
${runAsRoot}
'';
runScriptFile = writers.writeBash "run-script.sh" ''
set -e
${runScript}
'';
result = vmTools.runInLinuxVM ( result = vmTools.runInLinuxVM (
runCommand "${projectName}-image-${name}.img" runCommand "${projectName}-image-${name}.sif"
{ {
buildInputs = [ nativeBuildInputs = [
singularity singularity
e2fsprogs e2fsprogs
util-linux util-linux
gawk
]; ];
strictDeps = true;
layerClosure = writeClosure contents; layerClosure = writeClosure contents;
preVM = vmTools.createEmptyImage { preVM = vmTools.createEmptyImage {
size = diskSize; size = diskSize;
@ -83,10 +100,10 @@ rec {
# Run root script # Run root script
${lib.optionalString (runAsRoot != null) '' ${lib.optionalString (runAsRoot != null) ''
mkdir -p ./${storeDir} mkdir -p ./${builtins.storeDir}
mount --rbind ${storeDir} ./${storeDir} mount --rbind "${builtins.storeDir}" ./${builtins.storeDir}
unshare -imnpuf --mount-proc chroot ./ ${runAsRootFile} unshare -imnpuf --mount-proc chroot ./ ${runAsRootFile}
umount -R ./${storeDir} umount -R ./${builtins.storeDir}
''} ''}
# Build /bin and copy across closure # Build /bin and copy across closure
@ -105,14 +122,14 @@ rec {
# Create runScript and link shell # Create runScript and link shell
if [ ! -e bin/sh ]; then if [ ! -e bin/sh ]; then
ln -s ${runtimeShell} bin/sh ln -s ${lib.getExe bashInteractive} bin/sh
fi fi
mkdir -p .${projectName}.d mkdir -p .singularity.d
ln -s ${runScriptFile} .${projectName}.d/runscript ln -s ${runScriptFile} .singularity.d/runscript
# Fill out .${projectName}.d # Fill out .singularity.d
mkdir -p .${projectName}.d/env mkdir -p .singularity.d/env
touch .${projectName}.d/env/94-appsbase.sh touch .singularity.d/env/94-appsbase.sh
cd .. cd ..
mkdir -p /var/lib/${projectName}/mnt/session mkdir -p /var/lib/${projectName}/mnt/session

View File

@ -21,14 +21,82 @@ let
; ;
in in
rec { rec {
# Base implementation for non-compiled executables. /**
# Takes an interpreter, for example `${lib.getExe pkgs.bash}` A generic function that returns a derivation which, when beeing built outputs the script in an executable format.
#
# Examples: # Inputs
# writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
# makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world" config (AttrSet)
makeScriptWriter = { interpreter, check ? "", makeWrapperArgs ? [], }: nameOrPath: content: : `interpreter` (String)
assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null); : the interpreter to use for the script
: `check` (String)
: A command to check the script. I.e. some linting check.
: `makeWrapperArgs` (Optional, [ String ], Default: [])
: Arguments forwarded to (`makeWrapper`)[#fun-makeWrapper]
`nameOrPath` (String)
: The name of the script or the path to the script.
When a `string` starting with "/" is passed, the script will be created at the specified path in $out.
I.e. `"/bin/hello"` will create a script at `$out/bin/hello`.
Any other `string` is interpreted as filename.
It must be a simple unix filename starting with a letter, digit, dot, or underscore.
Spaces or special characters are not allowed.
`content` (String)
: The content of the script.
:::{.note}
This function is used as base implementation for other high-level writer functions.
For example, `writeBash` can (roughly) be implemented as:
```nix
writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
```
:::
# Examples
:::{.example}
## `pkgs.writers.makeScriptWriter` dash example
```nix-repl
:b makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world"
-> /nix/store/indvlr9ckmnv4f0ynkmasv2h4fxhand0-hello
```
The above example creates a script named `hello` that outputs `hello world` when executed.
```sh
> /nix/store/indvlr9ckmnv4f0ynkmasv2h4fxhand0-hello
hello world
```
:::
:::{.example}
## `pkgs.writers.makeScriptWriter` python example
```nix-repl
:b makeScriptWriter { interpreter = "${pkgs.python3}/bin/python"; } "python-hello" "print('hello world')"
-> /nix/store/4kvby1hqr45ffcdrvfpnpj62hanskw93-python-hello
```
```sh
> /nix/store/4kvby1hqr45ffcdrvfpnpj62hanskw93-python-hello
hello world
```
:::
*/
makeScriptWriter =
{
interpreter,
check ? "",
makeWrapperArgs ? [ ],
}:
nameOrPath: content:
assert
(types.path.check nameOrPath)
|| (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
assert (types.path.check content) || (types.str.check content); assert (types.path.check content) || (types.str.check content);
let let
nameIsPath = types.path.check nameOrPath; nameIsPath = types.path.check nameOrPath;
@ -37,83 +105,146 @@ rec {
# The inner derivation which creates the executable under $out/bin (never at $out directly) # The inner derivation which creates the executable under $out/bin (never at $out directly)
# This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper. # This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.
inner = inner =
pkgs.runCommandLocal name ( pkgs.runCommandLocal name
{ (
inherit makeWrapperArgs; {
nativeBuildInputs = [ inherit makeWrapperArgs;
makeBinaryWrapper nativeBuildInputs = [ makeBinaryWrapper ];
]; meta.mainProgram = name;
meta.mainProgram = name;
}
// (
if (types.str.check content) then {
inherit content interpreter;
passAsFile = [ "content" ];
} else {
inherit interpreter;
contentPath = content;
} }
// (
if (types.str.check content) then
{
inherit content interpreter;
passAsFile = [ "content" ];
}
else
{
inherit interpreter;
contentPath = content;
}
)
) )
) ''
'' # On darwin a script cannot be used as an interpreter in a shebang but
# On darwin a script cannot be used as an interpreter in a shebang but # there doesn't seem to be a limit to the size of shebang and multiple
# there doesn't seem to be a limit to the size of shebang and multiple # arguments to the interpreter are allowed.
# arguments to the interpreter are allowed. if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter
if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter
then
wrapperInterpreterLine=$(head -1 "$interpreter" | tail -c+3)
# Get first word from the line (note: xargs echo remove leading spaces)
wrapperInterpreter=$(echo "$wrapperInterpreterLine" | xargs echo | cut -d " " -f1)
if isScript $wrapperInterpreter
then then
echo "error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported." wrapperInterpreterLine=$(head -1 "$interpreter" | tail -c+3)
exit 1 # Get first word from the line (note: xargs echo remove leading spaces)
wrapperInterpreter=$(echo "$wrapperInterpreterLine" | xargs echo | cut -d " " -f1)
if isScript $wrapperInterpreter
then
echo "error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported."
exit 1
fi
# This should work as long as wrapperInterpreter is a shell, which is
# the case for programs wrapped with makeWrapper, like
# python3.withPackages etc.
interpreterLine="$wrapperInterpreterLine $interpreter"
else
interpreterLine=$interpreter
fi fi
# This should work as long as wrapperInterpreter is a shell, which is echo "#! $interpreterLine" > $out
# the case for programs wrapped with makeWrapper, like cat "$contentPath" >> $out
# python3.withPackages etc. ${optionalString (check != "") ''
interpreterLine="$wrapperInterpreterLine $interpreter" ${check} $out
else ''}
interpreterLine=$interpreter chmod +x $out
fi
echo "#! $interpreterLine" > $out # Relocate executable
cat "$contentPath" >> $out # Wrap it if makeWrapperArgs are specified
${optionalString (check != "") '' mv $out tmp
${check} $out mkdir -p $out/$(dirname "${path}")
''} mv tmp $out/${path}
chmod +x $out if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
wrapProgram $out/${path} ''${makeWrapperArgs[@]}
fi
'';
in
if nameIsPath then
inner
# In case nameOrPath is a name, the user intends the executable to be located at $out.
# This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.
# This breaks the override pattern.
# In case this turns out to be a problem, we can still add more magic
else
pkgs.runCommandLocal name { } ''
ln -s ${inner}/bin/${name} $out
'';
# Relocate executable /**
# Wrap it if makeWrapperArgs are specified This is a generic function that returns a derivation which, when built, compiles the given script into an executable format.
mv $out tmp
mkdir -p $out/$(dirname "${path}")
mv tmp $out/${path}
if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
wrapProgram $out/${path} ''${makeWrapperArgs[@]}
fi
'';
in
if nameIsPath
then inner
# In case nameOrPath is a name, the user intends the executable to be located at $out.
# This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.
# This breaks the override pattern.
# In case this turns out to be a problem, we can still add more magic
else pkgs.runCommandLocal name {} ''
ln -s ${inner}/bin/${name} $out
'';
:::{.note}
This function is the base implementation for other compile language `writers`.
i.e. `writeHaskell`, `writeRust`.
:::
# Base implementation for compiled executables. # Inputs
# Takes a compile script, which in turn takes the name as an argument.
# config (AttrSet)
# Examples: : `compileScript` (String)
# writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; } : The script that compiles the given content into an executable.
makeBinWriter = { compileScript, strip ? true, makeWrapperArgs ? [] }: nameOrPath: content:
assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null); : `strip` (Boolean, Default: true)
: Whether to strip the executable or not.
: `makeWrapperArgs` (Optional, [ String ], Default: [])
: Arguments forwarded to (`makeWrapper`)[#fun-makeWrapper]
`nameOrPath` (String)
: The name of the script or the path to the script.
When a `string` starting with "/" is passed, the script will be created at the specified path in $out.
I.e. `"/bin/hello"` will create a script at `$out/bin/hello`.
Any other `string` is interpreted as filename.
It must be a simple unix filename starting with a letter, digit, dot, or underscore.
Spaces or special characters are not allowed.
# Examples
:::{.example}
## `pkgs.writers.makeBinWriter` example
```c
// main.c
#include <stdio.h>
int main()
{
printf("Hello, World!\n");
return 0;
}
```
```nix-repl
:b makeBinWriter { compileScript = "${pkgs.gcc}/bin/gcc -o $out $contentPath"; } "hello" ./main.c
out -> /nix/store/f6crc8mwj3lvcxqclw7n09cm8nb6kxbh-hello
```
The above example creates an executable named `hello` that outputs `Hello, World!` when executed.
```sh
> /nix/store/f6crc8mwj3lvcxqclw7n09cm8nb6kxbh-hello
Hello, World!
```
:::
*/
makeBinWriter =
{
compileScript,
strip ? true,
makeWrapperArgs ? [ ],
}:
nameOrPath: content:
assert
(types.path.check nameOrPath)
|| (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
assert (types.path.check content) || (types.str.check content); assert (types.path.check content) || (types.str.check content);
let let
nameIsPath = types.path.check nameOrPath; nameIsPath = types.path.check nameOrPath;
@ -122,46 +253,46 @@ rec {
# The inner derivation which creates the executable under $out/bin (never at $out directly) # The inner derivation which creates the executable under $out/bin (never at $out directly)
# This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper. # This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.
inner = inner =
pkgs.runCommandLocal name ( pkgs.runCommandLocal name
{ (
inherit makeWrapperArgs; {
nativeBuildInputs = [ inherit makeWrapperArgs;
makeBinaryWrapper nativeBuildInputs = [ makeBinaryWrapper ];
]; meta.mainProgram = name;
meta.mainProgram = name; }
} // (
// ( if (types.str.check content) then
if (types.str.check content) then { {
inherit content; inherit content;
passAsFile = [ "content" ]; passAsFile = [ "content" ];
} else { }
contentPath = content; else
} { contentPath = content; }
)
) )
) ''
'' ${compileScript}
${compileScript} ${lib.optionalString strip "${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}
${lib.optionalString strip # Sometimes binaries produced for darwin (e. g. by GHC) won't be valid
"${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"} # mach-o executables from the get-go, but need to be corrected somehow
# Sometimes binaries produced for darwin (e. g. by GHC) won't be valid # which is done by fixupPhase.
# mach-o executables from the get-go, but need to be corrected somehow ${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}
# which is done by fixupPhase. mv $out tmp
${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"} mkdir -p $out/$(dirname "${path}")
mv $out tmp mv tmp $out/${path}
mkdir -p $out/$(dirname "${path}") if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
mv tmp $out/${path} wrapProgram $out/${path} ''${makeWrapperArgs[@]}
if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then fi
wrapProgram $out/${path} ''${makeWrapperArgs[@]} '';
fi
'';
in in
if nameIsPath if nameIsPath then
then inner inner
# In case nameOrPath is a name, the user intends the executable to be located at $out. # In case nameOrPath is a name, the user intends the executable to be located at $out.
# This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}. # This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.
# This breaks the override pattern. # This breaks the override pattern.
# In case this turns out to be a problem, we can still add more magic # In case this turns out to be a problem, we can still add more magic
else pkgs.runCommandLocal name {} '' else
pkgs.runCommandLocal name { } ''
ln -s ${inner}/bin/${name} $out ln -s ${inner}/bin/${name} $out
''; '';
@ -184,10 +315,12 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeBash = name: argsOrScript: writeBash =
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript name: argsOrScript:
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.bash}"; }) name if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
else makeScriptWriter { interpreter = "${lib.getExe pkgs.bash}"; } name argsOrScript; makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.bash}"; }) name
else
makeScriptWriter { interpreter = "${lib.getExe pkgs.bash}"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to bash # Like writeScriptBin but the first line is a shebang to bash
# #
@ -208,8 +341,7 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeBashBin = name: writeBashBin = name: writeBash "/bin/${name}";
writeBash "/bin/${name}";
# Like writeScript but the first line is a shebang to dash # Like writeScript but the first line is a shebang to dash
# #
@ -230,10 +362,12 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeDash = name: argsOrScript: writeDash =
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript name: argsOrScript:
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.dash}"; }) name if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
else makeScriptWriter { interpreter = "${lib.getExe pkgs.dash}"; } name argsOrScript; makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.dash}"; }) name
else
makeScriptWriter { interpreter = "${lib.getExe pkgs.dash}"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to dash # Like writeScriptBin but the first line is a shebang to dash
# #
@ -254,8 +388,7 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeDashBin = name: writeDashBin = name: writeDash "/bin/${name}";
writeDash "/bin/${name}";
# Like writeScript but the first line is a shebang to fish # Like writeScript but the first line is a shebang to fish
# #
@ -276,16 +409,21 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeFish = name: argsOrScript: writeFish =
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript name: argsOrScript:
then makeScriptWriter (argsOrScript // { if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
interpreter = "${lib.getExe pkgs.fish} --no-config"; makeScriptWriter (
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only argsOrScript
}) name // {
else makeScriptWriter { interpreter = "${lib.getExe pkgs.fish} --no-config";
interpreter = "${lib.getExe pkgs.fish} --no-config"; check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only }
} name argsOrScript; ) name
else
makeScriptWriter {
interpreter = "${lib.getExe pkgs.fish} --no-config";
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
} name argsOrScript;
# Like writeScriptBin but the first line is a shebang to fish # Like writeScriptBin but the first line is a shebang to fish
# #
@ -306,8 +444,7 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeFishBin = name: writeFishBin = name: writeFish "/bin/${name}";
writeFish "/bin/${name}";
# writeHaskell takes a name, an attrset with libraries and haskell version (both optional) # writeHaskell takes a name, an attrset with libraries and haskell version (both optional)
# and some haskell source code and returns an executable. # and some haskell source code and returns an executable.
@ -318,30 +455,32 @@ rec {
# #
# main = launchMissiles # main = launchMissiles
# ''; # '';
writeHaskell = name: { writeHaskell =
ghc ? pkgs.ghc, name:
ghcArgs ? [], {
libraries ? [], ghc ? pkgs.ghc,
makeWrapperArgs ? [], ghcArgs ? [ ],
strip ? true, libraries ? [ ],
threadedRuntime ? true, makeWrapperArgs ? [ ],
}: strip ? true,
threadedRuntime ? true,
}:
let let
appendIfNotSet = el: list: if elem el list then list else list ++ [ el ]; appendIfNotSet = el: list: if elem el list then list else list ++ [ el ];
ghcArgs' = if threadedRuntime then appendIfNotSet "-threaded" ghcArgs else ghcArgs; ghcArgs' = if threadedRuntime then appendIfNotSet "-threaded" ghcArgs else ghcArgs;
in makeBinWriter { in
makeBinWriter {
compileScript = '' compileScript = ''
cp $contentPath tmp.hs cp $contentPath tmp.hs
${(ghc.withPackages (_: libraries ))}/bin/ghc ${lib.escapeShellArgs ghcArgs'} tmp.hs ${(ghc.withPackages (_: libraries))}/bin/ghc ${lib.escapeShellArgs ghcArgs'} tmp.hs
mv tmp $out mv tmp $out
''; '';
inherit makeWrapperArgs strip; inherit makeWrapperArgs strip;
} name; } name;
# writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin) # writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)
writeHaskellBin = name: writeHaskellBin = name: writeHaskell "/bin/${name}";
writeHaskell "/bin/${name}";
# Like writeScript but the first line is a shebang to nu # Like writeScript but the first line is a shebang to nu
# #
@ -362,11 +501,14 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeNu = name: argsOrScript: writeNu =
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript name: argsOrScript:
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; }) name if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
else makeScriptWriter { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; } name argsOrScript; makeScriptWriter (
argsOrScript // { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; }
) name
else
makeScriptWriter { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; } name argsOrScript;
# Like writeScriptBin but the first line is a shebang to nu # Like writeScriptBin but the first line is a shebang to nu
# #
@ -387,25 +529,27 @@ rec {
# '' # ''
# hello # hello
# '' # ''
writeNuBin = name: writeNuBin = name: writeNu "/bin/${name}";
writeNu "/bin/${name}";
# makeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer, # makeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer,
# If any libraries are specified, ruby.withPackages is used as interpreter, otherwise the "bare" ruby is used. # If any libraries are specified, ruby.withPackages is used as interpreter, otherwise the "bare" ruby is used.
makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], ... } @ args: makeRubyWriter =
makeScriptWriter ( ruby: rubyPackages: buildRubyPackages: name:
(builtins.removeAttrs args ["libraries"]) {
// { libraries ? [ ],
interpreter = ...
if libraries == [] }@args:
then "${ruby}/bin/ruby" makeScriptWriter (
else "${(ruby.withPackages (ps: libraries))}/bin/ruby"; (builtins.removeAttrs args [ "libraries" ])
# Rubocop doesn't seem to like running in this fashion. // {
#check = (writeDash "rubocop.sh" '' interpreter =
# exec ${lib.getExe buildRubyPackages.rubocop} "$1" if libraries == [ ] then "${ruby}/bin/ruby" else "${(ruby.withPackages (ps: libraries))}/bin/ruby";
#''); # Rubocop doesn't seem to like running in this fashion.
} #check = (writeDash "rubocop.sh" ''
) name; # exec ${lib.getExe buildRubyPackages.rubocop} "$1"
#'');
}
) name;
# Like writeScript but the first line is a shebang to ruby # Like writeScript but the first line is a shebang to ruby
# #
@ -415,26 +559,32 @@ rec {
# '' # ''
writeRuby = makeRubyWriter pkgs.ruby pkgs.rubyPackages buildPackages.rubyPackages; writeRuby = makeRubyWriter pkgs.ruby pkgs.rubyPackages buildPackages.rubyPackages;
writeRubyBin = name: writeRubyBin = name: writeRuby "/bin/${name}";
writeRuby "/bin/${name}";
# makeLuaWriter takes lua and compatible luaPackages and produces lua script writer, # makeLuaWriter takes lua and compatible luaPackages and produces lua script writer,
# which validates the script with luacheck at build time. If any libraries are specified, # which validates the script with luacheck at build time. If any libraries are specified,
# lua.withPackages is used as interpreter, otherwise the "bare" lua is used. # lua.withPackages is used as interpreter, otherwise the "bare" lua is used.
makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], ... } @ args: makeLuaWriter =
makeScriptWriter ( lua: luaPackages: buildLuaPackages: name:
(builtins.removeAttrs args ["libraries"]) {
// { libraries ? [ ],
interpreter = lua.interpreter; ...
}@args:
makeScriptWriter (
(builtins.removeAttrs args [ "libraries" ])
// {
interpreter = lua.interpreter;
# if libraries == [] # if libraries == []
# then lua.interpreter # then lua.interpreter
# else (lua.withPackages (ps: libraries)).interpreter # else (lua.withPackages (ps: libraries)).interpreter
# This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this. # This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this.
check = (writeDash "luacheck.sh" '' check = (
exec ${buildLuaPackages.luacheck}/bin/luacheck "$1" writeDash "luacheck.sh" ''
''); exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"
} ''
) name; );
}
) name;
# writeLua takes a name an attributeset with libraries and some lua source code and # writeLua takes a name an attributeset with libraries and some lua source code and
# returns an executable (should also work with luajit) # returns an executable (should also work with luajit)
@ -458,28 +608,28 @@ rec {
# '' # ''
writeLua = makeLuaWriter pkgs.lua pkgs.luaPackages buildPackages.luaPackages; writeLua = makeLuaWriter pkgs.lua pkgs.luaPackages buildPackages.luaPackages;
writeLuaBin = name: writeLuaBin = name: writeLua "/bin/${name}";
writeLua "/bin/${name}";
writeRust = name: { writeRust =
makeWrapperArgs ? [], name:
rustc ? pkgs.rustc, {
rustcArgs ? [], makeWrapperArgs ? [ ],
strip ? true, rustc ? pkgs.rustc,
}: rustcArgs ? [ ],
let strip ? true,
darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ]; }:
in let
darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ];
in
makeBinWriter { makeBinWriter {
compileScript = '' compileScript = ''
cp "$contentPath" tmp.rs cp "$contentPath" tmp.rs
PATH=${lib.makeBinPath [pkgs.gcc]} ${rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} ${lib.escapeShellArgs darwinArgs} -o "$out" tmp.rs PATH=${lib.makeBinPath [ pkgs.gcc ]} ${rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} ${lib.escapeShellArgs darwinArgs} -o "$out" tmp.rs
''; '';
inherit makeWrapperArgs strip; inherit makeWrapperArgs strip;
} name; } name;
writeRustBin = name: writeRustBin = name: writeRust "/bin/${name}";
writeRust "/bin/${name}";
# writeJS takes a name an attributeset with libraries and some JavaScript sourcecode and # writeJS takes a name an attributeset with libraries and some JavaScript sourcecode and
# returns an executable # returns an executable
@ -491,23 +641,26 @@ rec {
# var result = UglifyJS.minify(code); # var result = UglifyJS.minify(code);
# console.log(result.code); # console.log(result.code);
# '' # ''
writeJS = name: { libraries ? [] }: content: writeJS =
let name:
node-env = pkgs.buildEnv { {
name = "node"; libraries ? [ ],
paths = libraries; }:
pathsToLink = [ content:
"/lib/node_modules" let
]; node-env = pkgs.buildEnv {
}; name = "node";
in writeDash name '' paths = libraries;
export NODE_PATH=${node-env}/lib/node_modules pathsToLink = [ "/lib/node_modules" ];
exec ${lib.getExe pkgs.nodejs} ${pkgs.writeText "js" content} "$@" };
''; in
writeDash name ''
export NODE_PATH=${node-env}/lib/node_modules
exec ${lib.getExe pkgs.nodejs} ${pkgs.writeText "js" content} "$@"
'';
# writeJSBin takes the same arguments as writeJS but outputs a directory (like writeScriptBin) # writeJSBin takes the same arguments as writeJS but outputs a directory (like writeScriptBin)
writeJSBin = name: writeJSBin = name: writeJS "/bin/${name}";
writeJS "/bin/${name}";
awkFormatNginx = builtins.toFile "awkFormat-nginx.awk" '' awkFormatNginx = builtins.toFile "awkFormat-nginx.awk" ''
awk -f awk -f
@ -515,18 +668,22 @@ rec {
/\{/{ctx++;idx=1} /\{/{ctx++;idx=1}
/\}/{ctx--} /\}/{ctx--}
{id="";for(i=idx;i<ctx;i++)id=sprintf("%s%s", id, "\t");printf "%s%s\n", id, $0} {id="";for(i=idx;i<ctx;i++)id=sprintf("%s%s", id, "\t");printf "%s%s\n", id, $0}
'';
writeNginxConfig = name: text: pkgs.runCommandLocal name {
inherit text;
passAsFile = [ "text" ];
nativeBuildInputs = [ gixy ];
} /* sh */ ''
# nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16
awk -f ${awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out
gixy $out
''; '';
writeNginxConfig =
name: text:
pkgs.runCommandLocal name
{
inherit text;
passAsFile = [ "text" ];
nativeBuildInputs = [ gixy ];
} # sh
''
# nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16
awk -f ${awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out
gixy $out
'';
# writePerl takes a name an attributeset with libraries and some perl sourcecode and # writePerl takes a name an attributeset with libraries and some perl sourcecode and
# returns an executable # returns an executable
# #
@ -535,42 +692,55 @@ rec {
# use boolean; # use boolean;
# print "Howdy!\n" if true; # print "Howdy!\n" if true;
# '' # ''
writePerl = name: { libraries ? [], ... } @ args: writePerl =
name:
{
libraries ? [ ],
...
}@args:
makeScriptWriter ( makeScriptWriter (
(builtins.removeAttrs args ["libraries"]) (builtins.removeAttrs args [ "libraries" ])
// { // {
interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}"; interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";
} }
) name; ) name;
# writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin) # writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)
writePerlBin = name: writePerlBin = name: writePerl "/bin/${name}";
writePerl "/bin/${name}";
# makePythonWriter takes python and compatible pythonPackages and produces python script writer, # makePythonWriter takes python and compatible pythonPackages and produces python script writer,
# which validates the script with flake8 at build time. If any libraries are specified, # which validates the script with flake8 at build time. If any libraries are specified,
# python.withPackages is used as interpreter, otherwise the "bare" python is used. # python.withPackages is used as interpreter, otherwise the "bare" python is used.
makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [], ... } @ args: makePythonWriter =
let python: pythonPackages: buildPythonPackages: name:
ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}"; {
in libraries ? [ ],
makeScriptWriter flakeIgnore ? [ ],
( ...
(builtins.removeAttrs args ["libraries" "flakeIgnore"]) }@args:
let
ignoreAttribute =
optionalString (flakeIgnore != [ ])
"--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
in
makeScriptWriter (
(builtins.removeAttrs args [
"libraries"
"flakeIgnore"
])
// { // {
interpreter = interpreter =
if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then
if libraries == [] if libraries == [ ] then python.interpreter else (python.withPackages (ps: libraries)).interpreter
then python.interpreter else
else (python.withPackages (ps: libraries)).interpreter python.interpreter;
else python.interpreter check = optionalString python.isPy3k (
; writeDash "pythoncheck.sh" ''
check = optionalString python.isPy3k (writeDash "pythoncheck.sh" '' exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1" ''
''); );
} }
) ) name;
name;
# writePyPy2 takes a name an attributeset with libraries and some pypy2 sourcecode and # writePyPy2 takes a name an attributeset with libraries and some pypy2 sourcecode and
# returns an executable # returns an executable
@ -587,8 +757,7 @@ rec {
writePyPy2 = makePythonWriter pkgs.pypy2 pkgs.pypy2Packages buildPackages.pypy2Packages; writePyPy2 = makePythonWriter pkgs.pypy2 pkgs.pypy2Packages buildPackages.pypy2Packages;
# writePyPy2Bin takes the same arguments as writePyPy2 but outputs a directory (like writeScriptBin) # writePyPy2Bin takes the same arguments as writePyPy2 but outputs a directory (like writeScriptBin)
writePyPy2Bin = name: writePyPy2Bin = name: writePyPy2 "/bin/${name}";
writePyPy2 "/bin/${name}";
# writePython3 takes a name an attributeset with libraries and some python3 sourcecode and # writePython3 takes a name an attributeset with libraries and some python3 sourcecode and
# returns an executable # returns an executable
@ -605,8 +774,7 @@ rec {
writePython3 = makePythonWriter pkgs.python3 pkgs.python3Packages buildPackages.python3Packages; writePython3 = makePythonWriter pkgs.python3 pkgs.python3Packages buildPackages.python3Packages;
# writePython3Bin takes the same arguments as writePython3 but outputs a directory (like writeScriptBin) # writePython3Bin takes the same arguments as writePython3 but outputs a directory (like writeScriptBin)
writePython3Bin = name: writePython3Bin = name: writePython3 "/bin/${name}";
writePython3 "/bin/${name}";
# writePyPy3 takes a name an attributeset with libraries and some pypy3 sourcecode and # writePyPy3 takes a name an attributeset with libraries and some pypy3 sourcecode and
# returns an executable # returns an executable
@ -623,46 +791,60 @@ rec {
writePyPy3 = makePythonWriter pkgs.pypy3 pkgs.pypy3Packages buildPackages.pypy3Packages; writePyPy3 = makePythonWriter pkgs.pypy3 pkgs.pypy3Packages buildPackages.pypy3Packages;
# writePyPy3Bin takes the same arguments as writePyPy3 but outputs a directory (like writeScriptBin) # writePyPy3Bin takes the same arguments as writePyPy3 but outputs a directory (like writeScriptBin)
writePyPy3Bin = name: writePyPy3Bin = name: writePyPy3 "/bin/${name}";
writePyPy3 "/bin/${name}";
makeFSharpWriter =
{
dotnet-sdk ? pkgs.dotnet-sdk,
fsi-flags ? "",
libraries ? _: [ ],
...
}@args:
nameOrPath:
let
fname = last (builtins.split "/" nameOrPath);
path = if strings.hasSuffix ".fsx" nameOrPath then nameOrPath else "${nameOrPath}.fsx";
_nugetDeps = mkNugetDeps {
name = "${fname}-nuget-deps";
nugetDeps = libraries;
};
makeFSharpWriter = { dotnet-sdk ? pkgs.dotnet-sdk, fsi-flags ? "", libraries ? _: [], ... } @ args: nameOrPath: nuget-source = mkNugetSource {
let name = "${fname}-nuget-source";
fname = last (builtins.split "/" nameOrPath); description = "Nuget source with the dependencies for ${fname}";
path = if strings.hasSuffix ".fsx" nameOrPath then nameOrPath else "${nameOrPath}.fsx"; deps = [ _nugetDeps ];
_nugetDeps = mkNugetDeps { name = "${fname}-nuget-deps"; nugetDeps = libraries; }; };
nuget-source = mkNugetSource { fsi = writeBash "fsi" ''
name = "${fname}-nuget-source"; export HOME=$NIX_BUILD_TOP/.home
description = "Nuget source with the dependencies for ${fname}"; export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
deps = [ _nugetDeps ]; export DOTNET_CLI_TELEMETRY_OPTOUT=1
}; export DOTNET_NOLOGO=1
script="$1"; shift
${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} "$@" < "$script"
'';
fsi = writeBash "fsi" '' in
export HOME=$NIX_BUILD_TOP/.home content:
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 makeScriptWriter
export DOTNET_CLI_TELEMETRY_OPTOUT=1 (
export DOTNET_NOLOGO=1 (builtins.removeAttrs args [
script="$1"; shift "dotnet-sdk"
${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} "$@" < "$script" "fsi-flags"
''; "libraries"
])
// {
interpreter = fsi;
}
)
path
''
#i "nuget: ${nuget-source}/lib"
${content}
exit 0
'';
in content: makeScriptWriter ( writeFSharp = makeFSharpWriter { };
(builtins.removeAttrs args ["dotnet-sdk" "fsi-flags" "libraries"])
// {
interpreter = fsi;
}
) path
''
#i "nuget: ${nuget-source}/lib"
${ content }
exit 0
'';
writeFSharp = writeFSharpBin = name: writeFSharp "/bin/${name}";
makeFSharpWriter {};
writeFSharpBin = name:
writeFSharp "/bin/${name}";
} }

View File

@ -5,13 +5,13 @@
buildGoModule rec { buildGoModule rec {
pname = "api-linter"; pname = "api-linter";
version = "1.67.0"; version = "1.67.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "googleapis"; owner = "googleapis";
repo = "api-linter"; repo = "api-linter";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-B98YFQYjBzHmKTc3yowT9JfWe8fiOVu0pFyyrwKk3Ws="; hash = "sha256-nbLaLi3Uh/zU+SPHA2x8cMic/bOKBo9wybK3b1LHNpY=";
}; };
vendorHash = "sha256-+dyoWK5iXH480c+akg26BCF/J8lKQoATVqZUfqMa080="; vendorHash = "sha256-+dyoWK5iXH480c+akg26BCF/J8lKQoATVqZUfqMa080=";

View File

@ -8,7 +8,8 @@
ffmpeg-full, ffmpeg-full,
util-linux, util-linux,
python3, python3,
getopt getopt,
nixosTests,
}: }:
let let
@ -28,7 +29,7 @@ let
pname = "${pname}-client"; pname = "${pname}-client";
inherit (source) version; inherit (source) version;
src = runCommand "cp-source" {} '' src = runCommand "cp-source" { } ''
cp -r ${src}/client $out cp -r ${src}/client $out
''; '';
@ -41,13 +42,28 @@ let
}; };
wrapper = import ./wrapper.nix { wrapper = import ./wrapper.nix {
inherit stdenv ffmpeg-full pname nodejs getopt; inherit
stdenv
ffmpeg-full
pname
nodejs
getopt
;
}; };
in buildNpmPackage { in
buildNpmPackage {
inherit pname src; inherit pname src;
inherit (source) version; inherit (source) version;
postPatch = ''
# Always skip version checks of the binary manager.
# We provide our own binaries, and don't want to trigger downloads.
substituteInPlace server/managers/BinaryManager.js --replace-fail \
'if (!this.validVersions.length) return true' \
'return true'
'';
buildInputs = [ util-linux ]; buildInputs = [ util-linux ];
nativeBuildInputs = [ python3 ]; nativeBuildInputs = [ python3 ];
@ -67,15 +83,21 @@ in buildNpmPackage {
chmod +x $out/bin/${pname} chmod +x $out/bin/${pname}
''; '';
passthru.updateScript = ./update.nu; passthru = {
tests.basic = nixosTests.audiobookshelf;
updateScript = ./update.nu;
};
meta = with lib; { meta = {
homepage = "https://www.audiobookshelf.org/"; homepage = "https://www.audiobookshelf.org/";
description = "Self-hosted audiobook and podcast server"; description = "Self-hosted audiobook and podcast server";
changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${source.version}"; changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${source.version}";
license = licenses.gpl3; license = lib.licenses.gpl3;
maintainers = [ maintainers.jvanbruegge maintainers.adamcstephens ]; maintainers = with lib.maintainers; [
platforms = platforms.linux; jvanbruegge
adamcstephens
];
platforms = lib.platforms.linux;
mainProgram = "audiobookshelf"; mainProgram = "audiobookshelf";
}; };
} }

View File

@ -1,9 +1,9 @@
{ {
"owner": "advplyr", "owner": "advplyr",
"repo": "audiobookshelf", "repo": "audiobookshelf",
"rev": "e81b3461b2b6374d2868fd415a7bbb899bd2f837", "rev": "52a3bc224ae7c79fbb543716a25b731c65a8f76a",
"hash": "sha256-q3XDEi5DNvXxgcLYm4vI3my3wHPAjHMmEO1eiYD38Pw=", "hash": "sha256-SbpoCtd5PJ6fU9muy58J4VxlbKiJM0OfMALHC5DUqFc=",
"version": "2.12.2", "version": "2.12.3",
"depsHash": "sha256-XUKqkrh+RzTmPckh2YAcdu5sfO7HRw1fuYOlPeePZ7w=", "depsHash": "sha256-8YUGM+MPYFLpLwWe3W+eObxH4ZklDVGj8bDYkSWTzQg=",
"clientDepsHash": "sha256-A5cnzb+/ImpCb/pPTZN+puf3FDKkD+dB+T6KLJcbx5w=" "clientDepsHash": "sha256-8xE1M7InH+Rxjpb2rsdvC3LcLV+k8a83BKWCis5P+tY="
} }

View File

@ -9,16 +9,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "clipcat"; pname = "clipcat";
version = "0.18.1"; version = "0.18.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xrelkd"; owner = "xrelkd";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-rftAGrquvNPRu49rDUaPVO7EUMCvcLoV0w801BBOG8c="; hash = "sha256-95y/HiLmhqt1DFmAxLg/W7lr/9dfVtce4+tx+vG2Nuw=";
}; };
cargoHash = "sha256-Amm/NnJSnqB5q+bxRJ5A6GKOFhIGTq1OSXESF5r22bI="; cargoHash = "sha256-z2t7kq2ogMHJGF7xQnzc11B42gUZFTVokVkbw35CeY0=";
buildInputs = lib.optionals stdenv.isDarwin [ buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Cocoa

View File

@ -6,13 +6,13 @@
buildGoModule rec { buildGoModule rec {
pname = "gh-i"; pname = "gh-i";
version = "0.0.7"; version = "0.0.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "gennaro-tedesco"; owner = "gennaro-tedesco";
repo = "gh-i"; repo = "gh-i";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-nVMWeXssSpfWsD20+qLvQp6Wlrp/DiVNLBR6qnvuD2M="; hash = "sha256-fW9T7B/97kI8zjaTvJHOkEUGVVM+ysOxZzqVNeOfVkc=";
}; };
vendorHash = "sha256-TSl+7N3W3BeW8UWxUdTv3cob2P7eLvO+80BLqcbhanQ="; vendorHash = "sha256-TSl+7N3W3BeW8UWxUdTv3cob2P7eLvO+80BLqcbhanQ=";

View File

@ -7,13 +7,13 @@
buildGoModule rec { buildGoModule rec {
pname = "gh-markdown-preview"; pname = "gh-markdown-preview";
version = "1.6.0"; version = "1.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "yusukebe"; owner = "yusukebe";
repo = "gh-markdown-preview"; repo = "gh-markdown-preview";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-WOdcivT9s1yFOF6oXMaIay4i/zOhlBLxCaID8H3hnJw="; hash = "sha256-yfl50izjjyPmyV0Er0al/PPd87Yizqc8PnFV/FMpfEU=";
}; };
vendorHash = "sha256-O6Q9h5zcYAoKLjuzGu7f7UZY0Y5rL2INqFyJT2QZJ/E="; vendorHash = "sha256-O6Q9h5zcYAoKLjuzGu7f7UZY0Y5rL2INqFyJT2QZJ/E=";

View File

@ -8,16 +8,16 @@
buildGoModule rec { buildGoModule rec {
pname = "git-spice"; pname = "git-spice";
version = "0.3.1"; version = "0.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "abhinav"; owner = "abhinav";
repo = "git-spice"; repo = "git-spice";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-jBEoNfj3rGNqZaNJfJUZzXFmvmLUp2biHbk6E2C/Dww="; hash = "sha256-D+kwH7fBRvi+H0/L7Gezn1FMBk3AkL9MbLULAwvrzrg=";
}; };
vendorHash = "sha256-2SEFXjO6o6Hh1gmds/pIRwulyiSy6wxE/5wJnKcdX6A="; vendorHash = "sha256-24jtlvp8xSMzNejyzqt+MiQHRKprps132Q+rP9wlA30=";
subPackages = [ "." ]; subPackages = [ "." ];

View File

@ -6,16 +6,16 @@
buildGoModule rec { buildGoModule rec {
pname = "gogup"; pname = "gogup";
version = "0.27.3"; version = "0.27.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nao1215"; owner = "nao1215";
repo = "gup"; repo = "gup";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-8DtD22kvGez2iX0VqoZ1zSydcNYnDz3r698nXEwtoZE="; hash = "sha256-vCp513WpB3kWMN0nkohtvpuMN1WBndg1E6pF0Cd5FgE=";
}; };
vendorHash = "sha256-yqCmo33ihkaPK8iL5cnCIGbOLkdXjuIWLwtgAa+KB8Y="; vendorHash = "sha256-rtdbPwVZHwofpGccYU8NBiaikzNMIwSDggbRdnGTBu8=";
doCheck = false; doCheck = false;
ldflags = [ ldflags = [

View File

@ -6,15 +6,15 @@
}: }:
let let
timestamp = "202406271335"; timestamp = "202408011337";
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "jdt-language-server"; pname = "jdt-language-server";
version = "1.37.0"; version = "1.38.0";
src = fetchurl { src = fetchurl {
url = "https://download.eclipse.org/jdtls/milestones/${finalAttrs.version}/jdt-language-server-${finalAttrs.version}-${timestamp}.tar.gz"; url = "https://download.eclipse.org/jdtls/milestones/${finalAttrs.version}/jdt-language-server-${finalAttrs.version}-${timestamp}.tar.gz";
hash = "sha256-0EzZ9N9FzoWunPSVMMcqGjJLFO7nR68m4zdFAONrW9A="; hash = "sha256-uml3iKGfK6V7FjAqums0PGSZKMlfdrDRcElKwS0XrHg=";
}; };
sourceRoot = "."; sourceRoot = ".";

View File

@ -20,16 +20,16 @@ let
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "kanidm"; pname = "kanidm";
version = "1.2.3"; version = "1.3.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-J02IbAY5lyoMaq6wJiHizqeFBd5hB6id2YMPxlPsASM="; hash = "sha256-YFmWZlDcsSk+7EGkoK0SkAhNsrIQa55IRIVqisX3zqE=";
}; };
cargoHash = "sha256-JuTKHXpEhWga2vAZhCpyPFy4w6+9UaasD70oBcrr0Rw="; cargoHash = "sha256-8ZENe576gqm+FkQPCgz6mScqdacHilARFWmfe+kDL2A=";
KANIDM_BUILD_PROFILE = "release_nixos_${arch}"; KANIDM_BUILD_PROFILE = "release_nixos_${arch}";
@ -41,13 +41,15 @@ rustPlatform.buildRustPackage rec {
cpu_flags = if stdenv.isx86_64 then "x86_64_legacy" else "none"; cpu_flags = if stdenv.isx86_64 then "x86_64_legacy" else "none";
default_config_path = "/etc/kanidm/server.toml"; default_config_path = "/etc/kanidm/server.toml";
default_unix_shell_path = "${lib.getBin bashInteractive}/bin/bash"; default_unix_shell_path = "${lib.getBin bashInteractive}/bin/bash";
htmx_ui_pkg_path = "@htmx_ui_pkg_path@";
web_ui_pkg_path = "@web_ui_pkg_path@"; web_ui_pkg_path = "@web_ui_pkg_path@";
}; };
in in
'' ''
cp ${format profile} libs/profiles/${KANIDM_BUILD_PROFILE}.toml cp ${format profile} libs/profiles/${KANIDM_BUILD_PROFILE}.toml
substituteInPlace libs/profiles/${KANIDM_BUILD_PROFILE}.toml \ substituteInPlace libs/profiles/${KANIDM_BUILD_PROFILE}.toml \
--replace '@web_ui_pkg_path@' "${placeholder "out"}/ui" --replace '@htmx_ui_pkg_path@' "${placeholder "out"}/ui/hpkg" \
--replace '@web_ui_pkg_path@' "${placeholder "out"}/ui/pkg"
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
@ -67,8 +69,9 @@ rustPlatform.buildRustPackage rec {
postBuild = '' postBuild = ''
# We don't compile the wasm-part form source, as there isn't a rustc for # We don't compile the wasm-part form source, as there isn't a rustc for
# wasm32-unknown-unknown in nixpkgs yet. # wasm32-unknown-unknown in nixpkgs yet.
mkdir $out mkdir -p $out/ui
cp -r server/web_ui/pkg $out/ui cp -r server/web_ui/pkg $out/ui/pkg
cp -r server/core/static $out/ui/hpkg
''; '';
# Otherwise build breaks on some unused code # Otherwise build breaks on some unused code

View File

@ -10,16 +10,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "live-server"; pname = "live-server";
version = "0.7.0"; version = "0.8.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lomirus"; owner = "lomirus";
repo = "live-server"; repo = "live-server";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-BSAsD9nRlHaTDbBpLBxN9OOQ9SekRwQeYUWV1CZO4oY="; hash = "sha256-VsM77cEAjX12qCHS9fvImloY05b+swg7mabPd655C+s=";
}; };
cargoHash = "sha256-RwueYpa/CMriSOWwGZhkps6jHmqOdRuz+ECRq/ThPs0="; cargoHash = "sha256-a4yDHZm9LBNuwOrxra4da7u/2RNXry4UYPVDGu9eGxo=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];

View File

@ -9,12 +9,12 @@
}: }:
let let
version = "1.9.0"; version = "1.11.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mealie-recipes"; owner = "mealie-recipes";
repo = "mealie"; repo = "mealie";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-gg7ClclBS9j9n4/3HLxbX8HXTz9Zw5+BYG2MEYRsRBU="; hash = "sha256-tBbvmM66zCNpKqeekPY48j0t5PjLHeyQ8+kJ6755ivo=";
}; };
frontend = callPackage (import ./mealie-frontend.nix src version) { }; frontend = callPackage (import ./mealie-frontend.nix src version) { };
@ -93,8 +93,16 @@ pythonpkgs.buildPythonPackage rec {
]; ];
postPatch = '' postPatch = ''
rm -rf dev # Do not need dev scripts & code
substituteInPlace mealie/__init__.py \ substituteInPlace mealie/__init__.py \
--replace-fail '__version__ = ' '__version__ = "v${version}" #' --replace-fail '__version__ = ' '__version__ = "v${version}" #'
substituteInPlace mealie/services/backups_v2/alchemy_exporter.py \
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
substituteInPlace mealie/db/init_db.py \
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
''; '';
postInstall = let postInstall = let
@ -106,10 +114,10 @@ pythonpkgs.buildPythonPackage rec {
${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py ${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py
''; '';
in '' in ''
mkdir -p $out/config $out/bin $out/libexec mkdir -p $out/bin $out/libexec
rm -f $out/bin/* rm -f $out/bin/*
substitute ${src}/alembic.ini $out/config/alembic.ini \ substitute ${src}/alembic.ini $out/alembic.ini \
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic' --replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
makeWrapper ${start_script} $out/bin/mealie \ makeWrapper ${start_script} $out/bin/mealie \

View File

@ -5,13 +5,13 @@
}: }:
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nerdfetch"; pname = "nerdfetch";
version = "8.2.0"; version = "8.2.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ThatOneCalculator"; owner = "ThatOneCalculator";
repo = "NerdFetch"; repo = "NerdFetch";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-fSITel2WhlmKx+wMNKfur3zDqKYJs5+AZNJBd2MtGRw="; hash = "sha256-9S7mS+lUCT8/Q65fqlrnTksuK3mhynPX+jWPaV8U8Dg=";
}; };
dontUnpack = true; dontUnpack = true;

View File

@ -7,13 +7,13 @@
buildGoModule rec { buildGoModule rec {
pname = "openapi-changes"; pname = "openapi-changes";
version = "0.0.66"; version = "0.0.67";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "pb33f"; owner = "pb33f";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-KacN/j6mc6eUovFfKLgu86pZBde5zRjhjuJyny6IjZU="; hash = "sha256-SNH11z/0DeaYfGwBKW3iIeCVdlpcoZ1elIlgl+quWIY=";
}; };
# this test requires the `.git` of the project to be present # this test requires the `.git` of the project to be present

View File

@ -7,13 +7,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "quill-log"; pname = "quill-log";
version = "6.0.0"; version = "6.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "odygrd"; owner = "odygrd";
repo = "quill"; repo = "quill";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-hYnpMgxhL8TIkOzhxf4I/Eeix+BRecNYynuGPm/QwbA="; hash = "sha256-6m3ijZlQ8NB+uGtsxAfLgryKUwlroqexK3IuC2FG3J4=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -12,16 +12,16 @@ let
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "railway"; pname = "railway";
version = "3.11.2"; version = "3.11.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "railwayapp"; owner = "railwayapp";
repo = "cli"; repo = "cli";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-uYe/8FwiMFwxpKF3wz+EOz7OUjYV37RUG7kf1ZCZX1c="; hash = "sha256-b9koWJunBlbg92/n5Wdvri7TAn9sbscLXasX+isXMHA=";
}; };
cargoHash = "sha256-3CjKI3lIIa2H8F9Kc34NZr0D99D0aypFNwh+YPN/EZQ="; cargoHash = "sha256-1N/5HNDN45Y+GSsrxMhVJAGbLUyLjDZaVNHS77x1SKw=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];

View File

@ -5,11 +5,11 @@
renode.overrideAttrs (finalAttrs: _: { renode.overrideAttrs (finalAttrs: _: {
pname = "renode-unstable"; pname = "renode-unstable";
version = "1.15.1+20240801git19eb5fb22"; version = "1.15.1+20240808git7a138330e";
src = fetchurl { src = fetchurl {
url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-dotnet.tar.gz"; url = "https://builds.renode.io/renode-${finalAttrs.version}.linux-dotnet.tar.gz";
hash = "sha256-dIyMQtFXvHivlzC+Y3TrWsN81/cETKTaucZY5r/x5rU="; hash = "sha256-hxGh+Pzpvw7dfRLdaqSEUCM8zLN9z2HQD8owOCu/uY4=";
}; };
passthru.updateScript = passthru.updateScript =

View File

@ -5,6 +5,7 @@
cmake, cmake,
fetchFromGitHub, fetchFromGitHub,
gtkmm3, gtkmm3,
libGL,
libX11, libX11,
libXdmcp, libXdmcp,
libXext, libXext,
@ -87,6 +88,13 @@ stdenv.mkDerivation (finalAttrs: {
"--enable-avx2" "--enable-avx2"
]; ];
postPatch = ''
substituteInPlace external/glad/src/egl.c \
--replace-fail libEGL.so.1 "${lib.getLib libGL}/lib/libEGL.so.1"
substituteInPlace external/glad/src/glx.c \
--replace-fail libGL.so.1 ${lib.getLib libGL}/lib/libGL.so.1
'';
preConfigure = '' preConfigure = ''
cd ${if withGtk then "gtk" else "unix"} cd ${if withGtk then "gtk" else "unix"}
''; '';
@ -126,6 +134,7 @@ stdenv.mkDerivation (finalAttrs: {
AndersonTorres AndersonTorres
qknight qknight
thiagokokada thiagokokada
sugar700
]; ];
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
broken = (withGtk && stdenv.isDarwin); broken = (withGtk && stdenv.isDarwin);

View File

@ -1,25 +1,25 @@
{ {
"version": "0.129.0", "version": "0.130.0",
"binaries": { "binaries": {
"aarch64-darwin": { "aarch64-darwin": {
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/darwin/arm64/yc", "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/darwin/arm64/yc",
"hash": "sha256-ULd/fmWDBPPALf6Rb95n6zXsSuDBAkeWNH11f5PLIpE=" "hash": "sha256-nvEu2aV9ykG9j6p9+kW4bBGOoj5FzJD8eU1M9dFXF5I="
}, },
"aarch64-linux": { "aarch64-linux": {
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/arm64/yc", "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/arm64/yc",
"hash": "sha256-Tvy9hTpp37EUrEIDglNFqrH0laD0O+wwVWlCIBh6Jag=" "hash": "sha256-qZajFYaDVV+XcxC28MoRtIPaCm2He58p+yRMOrFhQU4="
}, },
"i686-linux": { "i686-linux": {
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/386/yc", "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/386/yc",
"hash": "sha256-rmcXdz7z1iXOUQTq0sFNNcZ1jG/Dypxfl2oyeJiwkjs=" "hash": "sha256-RhDZ2VnmO+GrKQ0SIFwyCqPxnfUc5VoGlgg8uJncERY="
}, },
"x86_64-darwin": { "x86_64-darwin": {
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/darwin/amd64/yc", "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/darwin/amd64/yc",
"hash": "sha256-DjAifjGBiRvJDx3j4iMR/t7zOITaz/iulfeDUZCvIhE=" "hash": "sha256-hGdInZAo+LH6qzoQXDmfSzVb1SdN565XuRGByzJrrfI="
}, },
"x86_64-linux": { "x86_64-linux": {
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/amd64/yc", "url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/amd64/yc",
"hash": "sha256-igj1iwznsL1OG3V8hOQVCbticzOtDH8dF8jLzMxO5Fg=" "hash": "sha256-0NwGi46WtOV/2oJJPiXIj0+39dKno2LlsVuWEFVycTI="
} }
} }
} }

View File

@ -38,12 +38,19 @@ finalAttrs: prevAttrs: {
++ lists.optionals finalAttrs.passthru.useCudatoolkitRunfile [ final.cudatoolkit ] ++ lists.optionals finalAttrs.passthru.useCudatoolkitRunfile [ final.cudatoolkit ]
++ lists.optionals (!finalAttrs.passthru.useCudatoolkitRunfile) [ final.libcublas.lib ]; ++ lists.optionals (!finalAttrs.passthru.useCudatoolkitRunfile) [ final.libcublas.lib ];
# Tell autoPatchelf about runtime dependencies. # Tell autoPatchelf about runtime dependencies. *_infer* libraries only
# exist in CuDNN 8.
# NOTE: Versions from CUDNN releases have four components. # NOTE: Versions from CUDNN releases have four components.
postFixup = strings.optionalString (strings.versionAtLeast finalAttrs.version "8.0.5.0") '' postFixup =
${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so strings.optionalString
${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so (
''; strings.versionAtLeast finalAttrs.version "8.0.5.0"
&& strings.versionOlder finalAttrs.version "9.0.0.0"
)
''
${meta.getExe patchelf} $lib/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so
${meta.getExe patchelf} $lib/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so
'';
passthru.useCudatoolkitRunfile = strings.versionOlder cudaVersion "11.3.999"; passthru.useCudatoolkitRunfile = strings.versionOlder cudaVersion "11.3.999";

View File

@ -257,6 +257,21 @@
url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz"; url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz";
hash = "sha256-R1MzYlx+QqevPKCy91BqEG4wyTsaoAgc2cE++24h47s="; hash = "sha256-R1MzYlx+QqevPKCy91BqEG4wyTsaoAgc2cE++24h47s=";
} }
{
version = "9.3.0.75";
minCudaVersion = "12.0";
maxCudaVersion = "12.6";
url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.3.0.75_cuda12-archive.tar.xz";
hash = "sha256-PW7xCqBtyTOaR34rBX4IX/hQC73ueeQsfhNlXJ7/LCY=";
}
{
version = "9.3.0.75";
minCudaVersion = "11.8";
maxCudaVersion = "11.8";
url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.3.0.75_cuda11-archive.tar.xz";
hash = "sha256-Bp2ghM02jzn7gw1MTpMYAwZPtl52b0z33y2ko0aiup8";
}
]; ];
}; };
} }

View File

@ -428,6 +428,12 @@ self: super: {
# (this should be possible by also taking PREFIX into account). # (this should be possible by also taking PREFIX into account).
./patches/git-annex-no-usr-prefix.patch ./patches/git-annex-no-usr-prefix.patch
]; ];
postPatch = ''
substituteInPlace Makefile \
--replace-fail 'InstallDesktopFile $(PREFIX)/bin/git-annex' \
'InstallDesktopFile git-annex'
'';
}) super.git-annex; }) super.git-annex;
# Too strict bounds on servant # Too strict bounds on servant

View File

@ -12,17 +12,17 @@ let
in in
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "lune"; pname = "lune";
version = "0.8.6"; version = "0.8.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "filiptibell"; owner = "filiptibell";
repo = "lune"; repo = "lune";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-03ckR2FpSlaAZlhjyX3ob+7W5Pq8OLri7jT+XIM7oeQ="; hash = "sha256-fWfBXcJq8WBYPu0/VKksbC5q9lKzf0psjBNMlAq/iig=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
cargoHash = "sha256-xEUq3Cc15bUAXpUoZw8tNQo6tW3/VXeuOtjIW4zrh1Q="; cargoHash = "sha256-+T5+rG4mxhAB/67DXQ6y+uK7A1Mbksc2BYaz4yOkLcA=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "nelua"; pname = "nelua";
version = "0-unstable-2024-06-16"; version = "0-unstable-2024-08-04";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "edubart"; owner = "edubart";
repo = "nelua-lang"; repo = "nelua-lang";
rev = "4b2c75f8fe5c1d11a966b2fe8974a256868749a6"; rev = "38c2d9ca14c992ddcd73f4067af8c6f37c550979";
hash = "sha256-98QKg9eKBDEobmARpH3FAS2C32iViSsBs71n1E8uI2s="; hash = "sha256-mpKGD9YP+D+1ySq+8lyRjXwptWL+uBG/p37bHDBoTJ8=";
}; };
postPatch = '' postPatch = ''

View File

@ -93,9 +93,9 @@ in {
major = "3"; major = "3";
minor = "13"; minor = "13";
patch = "0"; patch = "0";
suffix = "b4"; suffix = "rc1";
}; };
hash = "sha256-sqpVfDyHUjOr2vGxJChOXVD2uyONYqi1XxLcks6hlT8="; hash = "sha256-Z4uIR3XuwCJNUVn6kAh5AgusoqNs6UL9lf6/oa20pr0=";
inherit (darwin) configd; inherit (darwin) configd;
inherit passthruFun; inherit passthruFun;
}; };

View File

@ -13,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "aioopenexchangerates"; pname = "aioopenexchangerates";
version = "0.4.15"; version = "0.4.16";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "MartinHjelmare"; owner = "MartinHjelmare";
repo = "aioopenexchangerates"; repo = "aioopenexchangerates";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-WKXxCa3wUTvLaN12EZE4l/hTTzSe291lnNLrspwUCs4="; hash = "sha256-cSHqlFzZiQ0CCH+rPDqPulrLPuE6BB7Qd+wWb4ZWPtk=";
}; };
postPatch = '' postPatch = ''

View File

@ -16,7 +16,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "aiortm"; pname = "aiortm";
version = "0.8.15"; version = "0.8.17";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -25,7 +25,7 @@ buildPythonPackage rec {
owner = "MartinHjelmare"; owner = "MartinHjelmare";
repo = "aiortm"; repo = "aiortm";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-eWky7jZ8QoH467R/9+3aQYyOKAC74aMeZeasTEX61zg="; hash = "sha256-iZYzERIJslbvmW+4yeHQvXt1EEyZcSR6+qYdpo9EmAg=";
}; };
postPatch = '' postPatch = ''

View File

@ -12,14 +12,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "cmsdials"; pname = "cmsdials";
version = "1.2.0"; version = "1.3.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cms-DQM"; owner = "cms-DQM";
repo = "dials-py"; repo = "dials-py";
rev = "v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-664FvPdZFU5eTcMadnHfs0ZeiKqTH+Gy2bnhIFQxU2o="; hash = "sha256-tV802rz8V9zkjxOoGDXuYGD9FNWjdPb3Grp2khwxC9I=";
}; };
build-system = [ poetry-core ]; build-system = [ poetry-core ];

View File

@ -10,7 +10,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "fireflyalgorithm"; pname = "fireflyalgorithm";
version = "0.4.4"; version = "0.4.5";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "firefly-cpp"; owner = "firefly-cpp";
repo = "FireflyAlgorithm"; repo = "FireflyAlgorithm";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-xsTgSHBtN4gGw+9YvprcLubnCXSNRdn4abcz391cMEE="; hash = "sha256-dJnjeJN9NI8G/haYeOiMtAl56cExqMk0iTWpaybl4nE=";
}; };
nativeBuildInputs = [ poetry-core ]; nativeBuildInputs = [ poetry-core ];

View File

@ -0,0 +1,46 @@
{
appdirs,
buildPythonPackage,
fetchFromGitHub,
importlib-resources,
lib,
poetry-core,
pyserial,
pyserial-asyncio,
pytestCheckHook,
pyyaml,
}:
buildPythonPackage rec {
pname = "heatmiserv3";
version = "2.0.3";
pyproject = true;
src = fetchFromGitHub {
owner = "andylockran";
repo = "heatmiserV3";
rev = "refs/tags/${version}";
hash = "sha256-Ia0QUMDvuvn2af52lW7ObSQ9MSPNOgWyBuFBnqfYrpM=";
};
build-system = [ poetry-core ];
dependencies = [
appdirs
importlib-resources
pyserial
pyserial-asyncio
pyyaml
];
pythonImportsCheck = [ "heatmiserv3" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Library to interact with Heatmiser Themostats using V3 protocol";
homepage = "https://github.com/andylockran/heatmiserV3";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}

View File

@ -1472,7 +1472,7 @@ checksum = "9106e1d747ffd48e6be5bb2d97fa706ed25b144fbee4d5c02eae110cd8d6badd"
[[package]] [[package]]
name = "macos-certificate-truster" name = "macos-certificate-truster"
version = "0.6.2" version = "0.6.3"
dependencies = [ dependencies = [
"security-framework", "security-framework",
] ]
@ -1563,7 +1563,7 @@ dependencies = [
[[package]] [[package]]
name = "mitm-wg-test-client" name = "mitm-wg-test-client"
version = "0.6.2" version = "0.6.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"boringtun", "boringtun",
@ -1574,7 +1574,7 @@ dependencies = [
[[package]] [[package]]
name = "mitmproxy" name = "mitmproxy"
version = "0.6.2" version = "0.6.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"boringtun", "boringtun",
@ -1610,7 +1610,7 @@ dependencies = [
[[package]] [[package]]
name = "mitmproxy_rs" name = "mitmproxy_rs"
version = "0.6.2" version = "0.6.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"boringtun", "boringtun",
@ -3000,7 +3000,7 @@ dependencies = [
[[package]] [[package]]
name = "windows-redirector" name = "windows-redirector"
version = "0.6.2" version = "0.6.3"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"env_logger", "env_logger",

View File

@ -12,14 +12,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "mitmproxy-rs"; pname = "mitmproxy-rs";
version = "0.6.2"; version = "0.6.3";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mitmproxy"; owner = "mitmproxy";
repo = "mitmproxy_rs"; repo = "mitmproxy_rs";
rev = version; rev = version;
hash = "sha256-zBlt83mtJOsVqskDAkpk50yZHxJO6B8QP7iv8L1YPWA="; hash = "sha256-rnM2MNJ9ZVmwFjhXU8kPEQjpqNIzVZ3bVtm43WvGj5E=";
}; };
cargoDeps = rustPlatform.importCargoLock { cargoDeps = rustPlatform.importCargoLock {
@ -47,7 +47,7 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Rust bits in mitmproxy"; description = "Rust bits in mitmproxy";
homepage = "https://github.com/mitmproxy/mitmproxy_rs"; homepage = "https://github.com/mitmproxy/mitmproxy_rs";
changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md"; changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md#${lib.replaceStrings ["."] [""] version}";
license = licenses.mit; license = licenses.mit;
inherit (mitmproxy.meta) maintainers; inherit (mitmproxy.meta) maintainers;
}; };

View File

@ -45,7 +45,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "mitmproxy"; pname = "mitmproxy";
version = "10.4.0"; version = "10.4.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
@ -54,7 +54,7 @@ buildPythonPackage rec {
owner = "mitmproxy"; owner = "mitmproxy";
repo = "mitmproxy"; repo = "mitmproxy";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-W+m7PVphj4sP5+Um7dtPbdnaZ+edZn/fcE4XJGX1E6M="; hash = "sha256-1OMVgV6dFKoG/upv+RWbYqftqejeQLBlsycuy2+Na6E=";
}; };

View File

@ -15,14 +15,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "particle"; pname = "particle";
version = "0.24.0"; version = "0.25.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-irS13UVHui2ug1SVWkNSEIkqV13/RvMjysbPQGALl2o="; hash = "sha256-ji1fo2VV5q8hi2bpe5WFsdT1IIV4XZbAZ3NvCy5X9a0=";
}; };
postPatch = '' postPatch = ''

View File

@ -10,7 +10,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyads"; pname = "pyads";
version = "3.4.0"; version = "3.4.2";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "stlehmann"; owner = "stlehmann";
repo = "pyads"; repo = "pyads";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
hash = "sha256-HJ/dlRuwFSY5j/mAp6rLMlTV59GFwrTV27n73TWlCUo="; hash = "sha256-OvDh92fwHW+UzEO5iqVOY7d5H0Es6CJK/f/HCyLO9J4=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View File

@ -20,13 +20,13 @@
toPythonModule ( toPythonModule (
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pygmo"; pname = "pygmo";
version = "2.19.6"; version = "2.19.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "esa"; owner = "esa";
repo = "pygmo2"; repo = "pygmo2";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-umXK8LGJJ6Xj6UbJ5k/DM/nYayjl+jBXtjar5/dWqFM="; hash = "sha256-279KNnP11f5ob2senIVmbnlmhRp2p3RoZLsQRE6yJ5Q=";
}; };
cmakeFlags = [ "-DPYGMO_INSTALL_PATH=${placeholder "out"}/${python.sitePackages}" ]; cmakeFlags = [ "-DPYGMO_INSTALL_PATH=${placeholder "out"}/${python.sitePackages}" ];

View File

@ -7,12 +7,12 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "sabctools"; pname = "sabctools";
version = "8.2.4"; version = "8.2.5";
pyproject = true; pyproject = true;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-qPi/+Q+xLm+djlYeTXyVi3q/R1zEtXgOY7wxLjnp7Ew="; hash = "sha256-ZEC813/JpGPEFL+nXKFAXFfUrrhECCIqONe27LwS00g=";
}; };
nativeBuildInputs = [ setuptools ]; nativeBuildInputs = [ setuptools ];

View File

@ -20,15 +20,15 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "scikit-tda"; pname = "scikit-tda";
version = "1.0.0"; version = "1.1.1";
format = "setuptools"; format = "setuptools";
disabled = isPy27; disabled = isPy27;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "scikit-tda"; owner = "scikit-tda";
repo = "scikit-tda"; repo = "scikit-tda";
rev = "v${version}"; rev = "refs/tags/v${version}";
sha256 = "0yhmf5jmxywyj6l9q0rfv9r8wpdk063fvvfnb4azwwccblgz37rj"; sha256 = "sha256-sf7UxCFJZlIMGOgNFwoh/30U7xsBCZuJ3eumsjEelMc=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -12,7 +12,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "yolink-api"; pname = "yolink-api";
version = "0.4.6"; version = "0.4.7";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "YoSmart-Inc"; owner = "YoSmart-Inc";
repo = "yolink-api"; repo = "yolink-api";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-A5cFz1u2b6mlE4NtMRQU3lruNqNWTYXH+tMvkH/zfUw="; hash = "sha256-VJqKORyAlTBIRsHaeUrLDuvVAU/EX/Zzh8u7xxmD2IE=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];

View File

@ -5,13 +5,13 @@
stdenvNoCC.mkDerivation (finalAttrs: { stdenvNoCC.mkDerivation (finalAttrs: {
pname = "cpm-cmake"; pname = "cpm-cmake";
version = "0.40.1"; version = "0.40.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cpm-cmake"; owner = "cpm-cmake";
repo = "cpm.cmake"; repo = "cpm.cmake";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-9yXBk0j9SNdQ+V2RVWhPlOXaX/S7OQDEVdnb2XehT9E="; hash = "sha256-KIRVztkE72juIgXquZlC6AYo78QKHBD7iCvCa+ri66k=";
}; };
dontConfigure = true; dontConfigure = true;

View File

@ -5,13 +5,13 @@
buildGoModule rec { buildGoModule rec {
pname = "goa"; pname = "goa";
version = "3.18.0"; version = "3.18.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "goadesign"; owner = "goadesign";
repo = "goa"; repo = "goa";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-hteD8wxpkw27tduBUYkCIE+vgN/ggkIezEgFWqSuxbo="; hash = "sha256-TBGCykHW++o2t4NFbWS3IK+UpXbyGgaJZ/6aoCrqi2Q=";
}; };
vendorHash = "sha256-AwpPuj/nX8MD//JL/oF+RGGQi1fdUo28KII2+y5Ptso="; vendorHash = "sha256-AwpPuj/nX8MD//JL/oF+RGGQi1fdUo28KII2+y5Ptso=";

View File

@ -7,16 +7,16 @@
buildGoModule rec { buildGoModule rec {
pname = "operator-sdk"; pname = "operator-sdk";
version = "1.36.0"; version = "1.36.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "operator-framework"; owner = "operator-framework";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-TdA0kqRDg0nSHbcqlZSzVyFL0hIwuv9rL98hftaWHe0="; hash = "sha256-ZUWbM2g3l5uesM9QDlRqRo9gFipgaS8YyEbnIyRaMS0=";
}; };
vendorHash = "sha256-+VA9xq1ilZ/NOrnEOIvw5YWcmAsqZKfQMGz9vPVNmzU="; vendorHash = "sha256-FEoAV3Fhmjhkc7sYfE1QQFmhOZbXps57mBD0fyvQq00=";
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper makeWrapper

View File

@ -5,16 +5,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "cargo-careful"; pname = "cargo-careful";
version = "0.4.2"; version = "0.4.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "RalfJung"; owner = "RalfJung";
repo = "cargo-careful"; repo = "cargo-careful";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-Yye1Dz6XTh7bWz63zENQ0QDbYbulO6SnRV7g/6mMgUw="; hash = "sha256-pYfyqsS+bGwSP6YZAtI+8iMXdID/hrCiX+cuYoYiZmc=";
}; };
cargoHash = "sha256-syj3Hf+DxPoJgNbZQERHaKAZwMYuCCmuEGb8ylQt1Xo="; cargoHash = "sha256-C+bnoYMO0Pjdgn4Q2Qb2COllMK0hnRNBwGd828o3AKE=";
meta = with lib; { meta = with lib; {
description = "Tool to execute Rust code carefully, with extra checking along the way"; description = "Tool to execute Rust code carefully, with extra checking along the way";

View File

@ -15,14 +15,14 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "nile"; pname = "nile";
version = "1.1.0-unstable-2024-07-15"; version = "1.1.1-unstable-2024-08-07";
format = "pyproject"; format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "imLinguin"; owner = "imLinguin";
repo = "nile"; repo = "nile";
rev = "55287cd81b7993e9ed86e5efb9d71566de02bd40"; rev = "9ce614f82a550a714ae55c4365658dba7bb1bb15";
hash = "sha256-sobhVggh8/BuKZWh39T0VJxg6kqADbC4AzeA32FQWN0="; hash = "sha256-7EzU8aUYiYe1eXFs6nE1qchlMzIKh2U09uIGmiN32xM=";
}; };
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";

View File

@ -1583,7 +1583,8 @@
pycec pycec
]; ];
"heatmiser" = ps: with ps; [ "heatmiser" = ps: with ps; [
]; # missing inputs: heatmiserV3 heatmiserv3
];
"heiwa" = ps: with ps; [ "heiwa" = ps: with ps; [
]; ];
"heos" = ps: with ps; [ "heos" = ps: with ps; [

View File

@ -0,0 +1,64 @@
From a09babb0cd9dd532ad2de920a2a35aa03d740dc6 Mon Sep 17 00:00:00 2001
From: Herwig Hochleitner <herwig@bendlas.net>
Date: Thu, 8 Aug 2024 00:29:14 +0200
Subject: [PATCH] parameterize frontend location
---
server/src/infra/tcp_server.rs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server/src/infra/tcp_server.rs b/server/src/infra/tcp_server.rs
index fa5f11f..16e64c5 100644
--- a/server/src/infra/tcp_server.rs
+++ b/server/src/infra/tcp_server.rs
@@ -25,7 +25,7 @@ use std::sync::RwLock;
use tracing::info;
async fn index<Backend>(data: web::Data<AppState<Backend>>) -> actix_web::Result<impl Responder> {
- let mut file = std::fs::read_to_string(r"./app/index.html")?;
+ let mut file = std::fs::read_to_string(r"@frontend@/index.html")?;
if data.server_url.path() != "/" {
file = file.replace(
@@ -80,7 +80,7 @@ pub(crate) fn error_to_http_response(error: TcpError) -> HttpResponse {
async fn main_js_handler<Backend>(
data: web::Data<AppState<Backend>>,
) -> actix_web::Result<impl Responder> {
- let mut file = std::fs::read_to_string(r"./app/static/main.js")?;
+ let mut file = std::fs::read_to_string(r"@frontend@/static/main.js")?;
if data.server_url.path() != "/" {
file = file.replace("/pkg/", format!("{}/pkg/", data.server_url.path()).as_str());
@@ -92,12 +92,12 @@ async fn main_js_handler<Backend>(
}
async fn wasm_handler() -> actix_web::Result<impl Responder> {
- Ok(actix_files::NamedFile::open_async("./app/pkg/lldap_app_bg.wasm").await?)
+ Ok(actix_files::NamedFile::open_async("@frontend@/pkg/lldap_app_bg.wasm").await?)
}
async fn wasm_handler_compressed() -> actix_web::Result<impl Responder> {
Ok(
- actix_files::NamedFile::open_async("./app/pkg/lldap_app_bg.wasm.gz")
+ actix_files::NamedFile::open_async("@frontend@/pkg/lldap_app_bg.wasm.gz")
.await?
.customize()
.insert_header(header::ContentEncoding::Gzip)
@@ -143,11 +143,11 @@ fn http_config<Backend>(
.service(web::resource("/pkg/lldap_app_bg.wasm").route(web::route().to(wasm_handler)))
.service(web::resource("/static/main.js").route(web::route().to(main_js_handler::<Backend>)))
// Serve the /pkg path with the compiled WASM app.
- .service(Files::new("/pkg", "./app/pkg"))
+ .service(Files::new("/pkg", "@frontend@/pkg"))
// Serve static files
- .service(Files::new("/static", "./app/static"))
+ .service(Files::new("/static", "@frontend@/static"))
// Serve static fonts
- .service(Files::new("/static/fonts", "./app/static/fonts"))
+ .service(Files::new("/static/fonts", "@frontend@/static/fonts"))
// Default to serve index.html for unknown routes, to support routing.
.default_service(web::route().guard(guard::Get()).to(index::<Backend>));
}
--
2.45.2

View File

@ -233,7 +233,7 @@ dependencies = [
"serde_urlencoded", "serde_urlencoded",
"smallvec", "smallvec",
"socket2", "socket2",
"time 0.3.19", "time 0.3.36",
"url", "url",
] ]
@ -395,7 +395,7 @@ dependencies = [
"num-traits", "num-traits",
"rusticata-macros", "rusticata-macros",
"thiserror", "thiserror",
"time 0.3.19", "time 0.3.36",
] ]
[[package]] [[package]]
@ -799,7 +799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
dependencies = [ dependencies = [
"percent-encoding", "percent-encoding",
"time 0.3.19", "time 0.3.36",
"version_check", "version_check",
] ]
@ -1090,6 +1090,15 @@ dependencies = [
"rusticata-macros", "rusticata-macros",
] ]
[[package]]
name = "deranged"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
]
[[package]] [[package]]
name = "derivative" name = "derivative"
version = "2.2.0" version = "2.2.0"
@ -1351,8 +1360,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9" checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9"
dependencies = [ dependencies = [
"atomic", "atomic",
"parking_lot",
"pear", "pear",
"serde", "serde",
"tempfile",
"toml", "toml",
"uncased", "uncased",
"version_check", "version_check",
@ -2364,9 +2375,9 @@ dependencies = [
[[package]] [[package]]
name = "ldap3_proto" name = "ldap3_proto"
version = "0.4.0" version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db993ebb4a1acda7ac25fa7e8609cff225a65f1f4a668e378eb252a1a6de433a" checksum = "a29eca0a9fef365d6d376a1b262e269a17b1c8c6de2cee76618642cd3c923506"
dependencies = [ dependencies = [
"base64 0.21.0", "base64 0.21.0",
"bytes", "bytes",
@ -2453,7 +2464,7 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]] [[package]]
name = "lldap" name = "lldap"
version = "0.5.0" version = "0.5.1-alpha"
dependencies = [ dependencies = [
"actix", "actix",
"actix-files", "actix-files",
@ -2473,6 +2484,7 @@ dependencies = [
"clap", "clap",
"cron", "cron",
"derive_builder", "derive_builder",
"derive_more",
"figment", "figment",
"figment_file_provider_adapter", "figment_file_provider_adapter",
"futures", "futures",
@ -2509,7 +2521,7 @@ dependencies = [
"sha2 0.10.6", "sha2 0.10.6",
"strum", "strum",
"thiserror", "thiserror",
"time 0.3.19", "time 0.3.36",
"tokio", "tokio",
"tokio-rustls", "tokio-rustls",
"tokio-stream", "tokio-stream",
@ -2528,7 +2540,7 @@ dependencies = [
[[package]] [[package]]
name = "lldap_app" name = "lldap_app"
version = "0.5.0" version = "0.5.1-alpha"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.13.1", "base64 0.13.1",
@ -2569,6 +2581,7 @@ dependencies = [
"opaque-ke", "opaque-ke",
"rand 0.8.5", "rand 0.8.5",
"rust-argon2", "rust-argon2",
"sea-orm",
"serde", "serde",
"sha2 0.9.9", "sha2 0.9.9",
"thiserror", "thiserror",
@ -2818,6 +2831,12 @@ dependencies = [
"zeroize", "zeroize",
] ]
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]] [[package]]
name = "num-integer" name = "num-integer"
version = "0.1.45" version = "0.1.45"
@ -3137,6 +3156,12 @@ version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "powerfmt"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.17" version = "0.2.17"
@ -3735,9 +3760,9 @@ checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.152" version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@ -3765,13 +3790,13 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.152" version = "1.0.193"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.109", "syn 2.0.32",
] ]
[[package]] [[package]]
@ -4357,11 +4382,14 @@ dependencies = [
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.19" version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2" checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [ dependencies = [
"deranged",
"itoa", "itoa",
"num-conv",
"powerfmt",
"serde", "serde",
"time-core", "time-core",
"time-macros", "time-macros",
@ -4369,16 +4397,17 @@ dependencies = [
[[package]] [[package]]
name = "time-core" name = "time-core"
version = "0.1.0" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]] [[package]]
name = "time-macros" name = "time-macros"
version = "0.2.7" version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c" checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [ dependencies = [
"num-conv",
"time-core", "time-core",
] ]
@ -4893,9 +4922,9 @@ dependencies = [
[[package]] [[package]]
name = "webpki" name = "webpki"
version = "0.22.1" version = "0.22.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f"
dependencies = [ dependencies = [
"ring", "ring",
"untrusted", "untrusted",
@ -5127,7 +5156,7 @@ dependencies = [
"oid-registry", "oid-registry",
"rusticata-macros", "rusticata-macros",
"thiserror", "thiserror",
"time 0.3.19", "time 0.3.36",
] ]
[[package]] [[package]]

View File

@ -18,15 +18,15 @@ let
cargoHash = "sha256-vcpxcRlW1OKoD64owFF6mkxSqmNrvY+y3Ckn5UwEQ50="; cargoHash = "sha256-vcpxcRlW1OKoD64owFF6mkxSqmNrvY+y3Ckn5UwEQ50=";
}; };
commonDerivationAttrs = rec { commonDerivationAttrs = {
pname = "lldap"; pname = "lldap";
version = "0.5.0"; version = "0.5.1-unstable-2024-08-09";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lldap"; owner = "lldap";
repo = "lldap"; repo = "lldap";
rev = "v${version}"; rev = "4138963bee15f5423629c081ec88805d43b8235c";
hash = "sha256-2MEfwppkS9l3iHPNlkJB4tJnma0xMi0AckLv6wpzy1Y="; hash = "sha256-g/Y+StSQQiA+1O0yh2xIhBHO9/MjM4QW1DNQIABTHdI=";
}; };
# `Cargo.lock` has git dependencies, meaning can't use `cargoHash` # `Cargo.lock` has git dependencies, meaning can't use `cargoHash`
@ -38,6 +38,7 @@ let
"yew_form-0.1.8" = "sha256-1n9C7NiFfTjbmc9B5bDEnz7ZpYJo9ZT8/dioRXJ65hc="; "yew_form-0.1.8" = "sha256-1n9C7NiFfTjbmc9B5bDEnz7ZpYJo9ZT8/dioRXJ65hc=";
}; };
}; };
}; };
frontend = rustPlatform.buildRustPackage (commonDerivationAttrs // { frontend = rustPlatform.buildRustPackage (commonDerivationAttrs // {
@ -60,11 +61,10 @@ let
}); });
in rustPlatform.buildRustPackage (commonDerivationAttrs // { in rustPlatform.buildRustPackage (commonDerivationAttrs // {
cargoBuildFlags = [ "-p" "lldap" "-p" "lldap_migration_tool" "-p" "lldap_set_password" ]; cargoBuildFlags = [ "-p" "lldap" "-p" "lldap_migration_tool" "-p" "lldap_set_password" ];
patches = [ patches = [
./static-frontend-path.patch ./0001-parameterize-frontend-location.patch
]; ];
postPatch = '' postPatch = ''

View File

@ -1,43 +0,0 @@
diff --git a/server/src/infra/tcp_server.rs b/server/src/infra/tcp_server.rs
index 43f65ea..e289f2a 100644
--- a/server/src/infra/tcp_server.rs
+++ b/server/src/infra/tcp_server.rs
@@ -26,7 +26,7 @@ use std::sync::RwLock;
use tracing::info;
async fn index() -> actix_web::Result<NamedFile> {
- let path = PathBuf::from(r"app/index.html");
+ let path = PathBuf::from(r"@frontend@/index.html");
Ok(NamedFile::open(path)?)
}
@@ -68,12 +68,12 @@ pub(crate) fn error_to_http_response(error: TcpError) -> HttpResponse {
}
async fn wasm_handler() -> actix_web::Result<impl Responder> {
- Ok(actix_files::NamedFile::open_async("./app/pkg/lldap_app_bg.wasm").await?)
+ Ok(actix_files::NamedFile::open_async("@frontend@/pkg/lldap_app_bg.wasm").await?)
}
async fn wasm_handler_compressed() -> actix_web::Result<impl Responder> {
Ok(
- actix_files::NamedFile::open_async("./app/pkg/lldap_app_bg.wasm.gz")
+ actix_files::NamedFile::open_async("@frontend@/pkg/lldap_app_bg.wasm.gz")
.await?
.customize()
.insert_header(header::ContentEncoding::Gzip)
@@ -118,11 +118,11 @@ fn http_config<Backend>(
)
.service(web::resource("/pkg/lldap_app_bg.wasm").route(web::route().to(wasm_handler)))
// Serve the /pkg path with the compiled WASM app.
- .service(Files::new("/pkg", "./app/pkg"))
+ .service(Files::new("/pkg", "@frontend@/pkg"))
// Serve static files
- .service(Files::new("/static", "./app/static"))
+ .service(Files::new("/static", "@frontend@/static"))
// Serve static fonts
- .service(Files::new("/static/fonts", "./app/static/fonts"))
+ .service(Files::new("/static/fonts", "@frontend@/static/fonts"))
// Default to serve index.html for unknown routes, to support routing.
.default_service(web::route().guard(guard::Get()).to(index));
}

View File

@ -5,14 +5,14 @@
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "gyb"; pname = "gyb";
version = "1.81"; version = "1.82";
format = "other"; format = "other";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "GAM-team"; owner = "GAM-team";
repo = "got-your-back"; repo = "got-your-back";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-ViNOEH5wyAQRR56egRhh4JoP1PWOCr+rxFmqxfJiu+0="; hash = "sha256-eKeT2tVBK2DcTOEC6Tvo+igPXPOD1wy66+kr0ltnMIU=";
}; };
dependencies = with python3.pkgs; [ dependencies = with python3.pkgs; [

View File

@ -6,16 +6,16 @@
buildGoModule rec { buildGoModule rec {
pname = "vault"; pname = "vault";
version = "1.17.2"; version = "1.17.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hashicorp"; owner = "hashicorp";
repo = "vault"; repo = "vault";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-R8ubsBLpjkBxJaPQokwWKtCcUW45fTkA36JnXCXHkeA="; hash = "sha256-N5nJBMRaHzK7aMPSeLVmnItf3CuGeblDMsGLDEz8HZc=";
}; };
vendorHash = "sha256-dS8DYiXXXuDJ9shK07kRUv2JnZ0eFm5YK2k470vwW/I="; vendorHash = "sha256-yy6bk86o/Q8KgggVJd8VCErG1txNbGsEuozyDa6IrCA=";
proxyVendor = true; proxyVendor = true;

View File

@ -1608,6 +1608,7 @@ mapAliases ({
zfsStable = zfs; # Added 2024-02-26 zfsStable = zfs; # Added 2024-02-26
zfsUnstable = zfs_unstable; # Added 2024-02-26 zfsUnstable = zfs_unstable; # Added 2024-02-26
zinc = zincsearch; # Added 2023-05-28 zinc = zincsearch; # Added 2023-05-28
zk-shell = throw "zk-shell has been removed as it was broken and unmaintained"; # Added 2024-08-10
zkg = throw "'zkg' has been replaced by 'zeek'"; zkg = throw "'zkg' has been replaced by 'zeek'";
zq = zed.overrideAttrs (old: { meta = old.meta // { mainProgram = "zq"; }; }); # Added 2023-02-06 zq = zed.overrideAttrs (old: { meta = old.meta // { mainProgram = "zq"; }; }); # Added 2023-02-06
zz = throw "'zz' has been removed because it was archived in 2022 and had no maintainer"; # added 2024-05-10 zz = throw "'zz' has been removed because it was archived in 2022 and had no maintainer"; # added 2024-05-10

View File

@ -39672,8 +39672,6 @@ with pkgs;
wtf = callPackage ../applications/misc/wtf { }; wtf = callPackage ../applications/misc/wtf { };
zk-shell = callPackage ../applications/misc/zk-shell { };
tora = libsForQt5.callPackage ../development/tools/tora { }; tora = libsForQt5.callPackage ../development/tools/tora { };
xrq = callPackage ../applications/misc/xrq { }; xrq = callPackage ../applications/misc/xrq { };

View File

@ -2696,8 +2696,14 @@ self: super: with self; {
cufflinks = callPackage ../development/python-modules/cufflinks { }; cufflinks = callPackage ../development/python-modules/cufflinks { };
# cupy 12.2.0 possibly incompatible with cutensor 2.0 that comes with cudaPackages_12 cupy = callPackage ../development/python-modules/cupy {
cupy = callPackage ../development/python-modules/cupy { cudaPackages = pkgs.cudaPackages_11; }; # cupy 12.2.0 possibly incompatible with cutensor 2.0 that comes with cudaPackages_12
cudaPackages = pkgs.cudaPackages_11.overrideScope (cu-fi: _: {
# CuDNN 9 is not supported:
# https://github.com/cupy/cupy/issues/8215
cudnn = cu-fi.cudnn_8_9;
});
};
curio = callPackage ../development/python-modules/curio { }; curio = callPackage ../development/python-modules/curio { };
@ -5509,6 +5515,8 @@ self: super: with self; {
heapdict = callPackage ../development/python-modules/heapdict { }; heapdict = callPackage ../development/python-modules/heapdict { };
heatmiserv3 = callPackage ../development/python-modules/heatmiserv3 { };
heatshrink2 = callPackage ../development/python-modules/heatshrink2 { }; heatshrink2 = callPackage ../development/python-modules/heatshrink2 { };
heatzypy = callPackage ../development/python-modules/heatzypy { }; heatzypy = callPackage ../development/python-modules/heatzypy { };