Merge staging-next into staging
This commit is contained in:
commit
9e4697663f
@ -19724,6 +19724,12 @@
|
||||
githubId = 32478597;
|
||||
name = "Subin Kim";
|
||||
};
|
||||
sugar700 = {
|
||||
email = "sugar@sylveon.social";
|
||||
github = "sugar700";
|
||||
githubId = 168804988;
|
||||
name = "sugar";
|
||||
};
|
||||
suhr = {
|
||||
email = "suhr@i2pmail.org";
|
||||
github = "suhr";
|
||||
|
@ -135,6 +135,10 @@
|
||||
Processes also now run as a dynamically allocated user by default instead of
|
||||
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
|
||||
moved into the top level scope (i.e., `budgie.budgie-desktop` is now
|
||||
`budgie-desktop`)
|
||||
|
@ -57,7 +57,6 @@ in
|
||||
|
||||
environment = {
|
||||
PRODUCTION = "true";
|
||||
ALEMBIC_CONFIG_FILE="${pkg}/config/alembic.ini";
|
||||
API_PORT = toString cfg.port;
|
||||
BASE_URL = "http://localhost:${toString cfg.port}";
|
||||
DATA_DIR = "/var/lib/mealie";
|
||||
|
@ -29,13 +29,13 @@ let
|
||||
in
|
||||
melpaBuild {
|
||||
pname = "lsp-bridge";
|
||||
version = "0-unstable-2024-07-27";
|
||||
version = "0-unstable-2024-08-06";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "manateelazycat";
|
||||
repo = "lsp-bridge";
|
||||
rev = "92d58ff0fb938ced513d690e0daadef74737e5d4";
|
||||
hash = "sha256-qeoKPwK3qKcvUFchaQYCCQmSlXgN+Tt2kU+lXqiUwaw=";
|
||||
rev = "49b5497243873b1bddea09a4a988e3573ed7cc3e";
|
||||
hash = "sha256-bGO5DjsetInDyGDHog5QJtAgz499kJEj52iWYIzdp5Y=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -24,7 +24,7 @@ in
|
||||
rm "$out/bin/kak"
|
||||
makeWrapper "${kakoune}/bin/kak" "$out/bin/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
|
||||
# copying doc files over, so they become regular files...
|
||||
|
@ -1054,6 +1054,10 @@
|
||||
'';
|
||||
};
|
||||
|
||||
markview-nvim = super.markview-nvim.overrideAttrs {
|
||||
dependencies = with self; [ nvim-web-devicons ];
|
||||
};
|
||||
|
||||
mason-lspconfig-nvim = super.mason-lspconfig-nvim.overrideAttrs {
|
||||
dependencies = with self; [ mason-nvim nvim-lspconfig ];
|
||||
};
|
||||
|
@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "nwg-dock";
|
||||
version = "0.3.9";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nwg-piotr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/iUtVym+fNnbBeLlrYIiO5tV9eeAVBh6Nw+d3GCJ/F8=";
|
||||
sha256 = "sha256-qmzCjbWmrDJBB2gnhR5hc0sYD3V0i/SKTavfMA2iLyc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-GW+shKOCwU8yprEfBeAPx1RDgjA7cZZzXDG112bdZ6k=";
|
||||
vendorHash = "sha256-paRcBQwg2uGouMRX5XF++OyN8Y0JyucXLN0G5O0j3qA=";
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
|
@ -20,13 +20,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "otpclient";
|
||||
version = "4.0.0";
|
||||
version = "4.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "paolostivanin";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-Ah1TWRxLFKgSDjnLO5XLIyo1hgD7EAlMHDbxxcOu4Yg=";
|
||||
hash = "sha256-lSGXxwtys3V8dDTAW7l7+9VlF9tZQnWqNaV8neBvMRg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pdfsam-basic";
|
||||
version = "5.2.3";
|
||||
version = "5.2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
|
||||
hash = "sha256-ai1UHMeLvCba6WV6f6dGc53CxPP7bJaPgo8Tm7ddkOM=";
|
||||
hash = "sha256-xtkp5OCxzLx0ZNeYlwLQWudzsILErlrAHacuq4hOL8E=";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
@ -27,11 +27,11 @@
|
||||
version = "2024-06-06";
|
||||
};
|
||||
ungoogled-patches = {
|
||||
hash = "sha256-4LfYBqFQ/e/ePaOTSFBpELt0ilo/Vohwnwp8FvkfavU=";
|
||||
rev = "127.0.6533.88-1";
|
||||
hash = "sha256-4iI+1mVMoI1xg2t+33PiYDsiuXw0v4oUbSbYX+I9Q7s=";
|
||||
rev = "127.0.6533.99-1";
|
||||
};
|
||||
};
|
||||
hash = "sha256-nZZ2yrVu+0TloMaM455bmyeoeVnfeGR3EGubAf8snNU=";
|
||||
version = "127.0.6533.88";
|
||||
hash = "sha256-VKPlcBfS6iw4E1nz0nYJLg273XmJ+RcGGktRbqQTTwQ=";
|
||||
version = "127.0.6533.99";
|
||||
};
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
let
|
||||
pname = "polypane";
|
||||
version = "20.1.1";
|
||||
version = "20.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/firstversionist/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
sha256 = "sha256-2bofd/2Eu2jpyvp5l1/Q6QIY2t7xaIV+ZhneGG38dA0=";
|
||||
sha256 = "sha256-rdbx0ffI8MDGXArniFnqTpuLLMlihtXXQiZnxw5vq+c=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
|
@ -2,18 +2,18 @@
|
||||
|
||||
buildGoModule rec{
|
||||
pname = "pinniped";
|
||||
version = "0.32.0";
|
||||
version = "0.33.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vmware-tanzu";
|
||||
repo = "pinniped";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ypl8P66SEoHpaqAgFA90bJmiVvH4SvymCMVz1o9x9mQ=";
|
||||
sha256 = "sha256-BcDUXu/p5BYPrisJJBcaAGHL0k7FHMRKj1/z6Bz9hLU=";
|
||||
};
|
||||
|
||||
subPackages = "cmd/pinniped";
|
||||
|
||||
vendorHash = "sha256-Tl5o/ytwdGT0bSa8ep7YSaSMM9rk8+Zx1SFgFGh9u6k=";
|
||||
vendorHash = "sha256-quGhv2JpMseQps9qPvuJ6Jit8CxcSCOWYHG684whwl4=";
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
|
@ -11,16 +11,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "twitch-tui";
|
||||
version = "2.6.13";
|
||||
version = "2.6.14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Xithrius";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-VEcBPiekjiDjXYTz/gqjES8N77GgwPdWRUJJ3twLmgU=";
|
||||
hash = "sha256-a/tPRGqD6YBw1Ls28kJNxQYNMc8mUq8wLgSg0yiJR+U=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-uhm6Z4oJ8w1tN3VDtCNF2/pixNLCXnaEg8yyUSTJRnM=";
|
||||
cargoHash = "sha256-MRbwA/riOECCv2/AzNIma9sMAyRrEDb6HDOaGVDxr1Q=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
|
@ -48,23 +48,23 @@ let
|
||||
# and often with different versions. We write them on three lines
|
||||
# like this (rather than using {}) so that the updater script can
|
||||
# find where to edit them.
|
||||
versions.aarch64-darwin = "6.1.1.36333";
|
||||
versions.x86_64-darwin = "6.1.1.36333";
|
||||
versions.x86_64-linux = "6.1.1.443";
|
||||
versions.aarch64-darwin = "6.1.6.37851";
|
||||
versions.x86_64-darwin = "6.1.6.37851";
|
||||
versions.x86_64-linux = "6.1.6.1013";
|
||||
|
||||
srcs = {
|
||||
aarch64-darwin = fetchurl {
|
||||
url = "https://zoom.us/client/${versions.aarch64-darwin}/zoomusInstallerFull.pkg?archType=arm64";
|
||||
name = "zoomusInstallerFull.pkg";
|
||||
hash = "sha256-CBBJAa7hnz0I2ctEn7DMdzeXEs4x+aEmEr+L42ddqXE=";
|
||||
hash = "sha256-wsatsfVQElWXMZKZOVeqVBBE7ZRXx54OpA82ZzpymUI=";
|
||||
};
|
||||
x86_64-darwin = fetchurl {
|
||||
url = "https://zoom.us/client/${versions.x86_64-darwin}/zoomusInstallerFull.pkg";
|
||||
hash = "sha256-CHtyL/BdyBVCQOGWjP0H/5GJiq67hPNQxELlvzzUuts=";
|
||||
hash = "sha256-BTLEfVFrUQbb+LpGP93hMqGFWhKM3tBdKxDKe8GkhiA=";
|
||||
};
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://zoom.us/client/${versions.x86_64-linux}/zoom_x86_64.pkg.tar.xz";
|
||||
hash = "sha256-2FOAZ3MKusouuWvhxFEcqX+2e+PCF4N5zaz7mc9Mnq4=";
|
||||
hash = "sha256-mvCJft0suOxnwTkWWuH9OYKHwTMWx61ct10P5Q/EVBM=";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "git-credential-oauth";
|
||||
version = "0.13.0";
|
||||
version = "0.13.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hickford";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hCZZPbkbkZcR2xFTECQWJl2MvSu8MnOznadaj0nKfSo=";
|
||||
hash = "sha256-pJ1Snq79bQvhE+D7U8pMmK4YyvoZIwv29kr5640jpns=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
@ -19,7 +19,7 @@ buildGoModule rec {
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
vendorHash = "sha256-nbwrVihcH+ARLHylsjogsv3LVP+0+YtQ+7cozB7pAWo=";
|
||||
vendorHash = "sha256-ujsfEmDOOGCNErtBW5EyefQ+jXhfnAiwteYm8F7RLVE=";
|
||||
|
||||
postInstall = ''
|
||||
installManPage $src/git-credential-oauth.1
|
||||
|
@ -8,6 +8,8 @@
|
||||
, after ? null
|
||||
, condition ? null
|
||||
, phase ? "2"
|
||||
, prependExtraArgs ? []
|
||||
, appendExtraArgs ? []
|
||||
}:
|
||||
|
||||
# the builder requires that
|
||||
@ -18,10 +20,17 @@ stdenv.mkDerivation {
|
||||
name = "autostart-${name}";
|
||||
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
|
||||
target=${name}.desktop
|
||||
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
|
||||
echo "X-KDE-autostart-phase=${phase}" >> $target
|
||||
${lib.optionalString (after != null) ''echo "${after}" >> $target''}
|
||||
|
@ -5,44 +5,55 @@
|
||||
runCommand,
|
||||
vmTools,
|
||||
writeClosure,
|
||||
writers,
|
||||
writeScript,
|
||||
# Native build inputs
|
||||
buildPackages,
|
||||
e2fsprogs,
|
||||
gawk,
|
||||
util-linux,
|
||||
# Build inputs
|
||||
bash,
|
||||
bashInteractive,
|
||||
runtimeShell,
|
||||
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 =
|
||||
{
|
||||
name,
|
||||
contents ? [ ],
|
||||
# May be "apptainer" instead of "singularity"
|
||||
projectName ? (singularity.projectName or "singularity"),
|
||||
}:
|
||||
runCommand "${projectName}-layer-${name}" { inherit contents; } ''
|
||||
mkdir $out
|
||||
for f in $contents ; do
|
||||
cp -ra $f $out/
|
||||
done
|
||||
'';
|
||||
lib.warn
|
||||
"`singularity-tools.mkLayer` is deprecated, as it is no longer used to implement `singularity-tools.buildImages`."
|
||||
(
|
||||
{
|
||||
name,
|
||||
contents ? [ ],
|
||||
# May be "apptainer" instead of "singularity"
|
||||
projectName ? (singularity.projectName or "singularity"),
|
||||
}:
|
||||
runCommand "${projectName}-layer-${name}" { inherit contents; } ''
|
||||
mkdir $out
|
||||
for f in $contents ; do
|
||||
cp -ra $f $out/
|
||||
done
|
||||
''
|
||||
);
|
||||
|
||||
buildImage =
|
||||
let
|
||||
defaultSingularity = singularity;
|
||||
in
|
||||
{
|
||||
name,
|
||||
contents ? [ ],
|
||||
@ -54,17 +65,23 @@ rec {
|
||||
}:
|
||||
let
|
||||
projectName = singularity.projectName or "singularity";
|
||||
runAsRootFile = shellScript "run-as-root.sh" runAsRoot;
|
||||
runScriptFile = shellScript "run-script.sh" runScript;
|
||||
runAsRootFile = buildPackages.writers.writeBash "run-as-root.sh" ''
|
||||
set -e
|
||||
${runAsRoot}
|
||||
'';
|
||||
runScriptFile = writers.writeBash "run-script.sh" ''
|
||||
set -e
|
||||
${runScript}
|
||||
'';
|
||||
result = vmTools.runInLinuxVM (
|
||||
runCommand "${projectName}-image-${name}.img"
|
||||
runCommand "${projectName}-image-${name}.sif"
|
||||
{
|
||||
buildInputs = [
|
||||
nativeBuildInputs = [
|
||||
singularity
|
||||
e2fsprogs
|
||||
util-linux
|
||||
gawk
|
||||
];
|
||||
strictDeps = true;
|
||||
layerClosure = writeClosure contents;
|
||||
preVM = vmTools.createEmptyImage {
|
||||
size = diskSize;
|
||||
@ -83,10 +100,10 @@ rec {
|
||||
|
||||
# Run root script
|
||||
${lib.optionalString (runAsRoot != null) ''
|
||||
mkdir -p ./${storeDir}
|
||||
mount --rbind ${storeDir} ./${storeDir}
|
||||
mkdir -p ./${builtins.storeDir}
|
||||
mount --rbind "${builtins.storeDir}" ./${builtins.storeDir}
|
||||
unshare -imnpuf --mount-proc chroot ./ ${runAsRootFile}
|
||||
umount -R ./${storeDir}
|
||||
umount -R ./${builtins.storeDir}
|
||||
''}
|
||||
|
||||
# Build /bin and copy across closure
|
||||
@ -105,14 +122,14 @@ rec {
|
||||
|
||||
# Create runScript and link shell
|
||||
if [ ! -e bin/sh ]; then
|
||||
ln -s ${runtimeShell} bin/sh
|
||||
ln -s ${lib.getExe bashInteractive} bin/sh
|
||||
fi
|
||||
mkdir -p .${projectName}.d
|
||||
ln -s ${runScriptFile} .${projectName}.d/runscript
|
||||
mkdir -p .singularity.d
|
||||
ln -s ${runScriptFile} .singularity.d/runscript
|
||||
|
||||
# Fill out .${projectName}.d
|
||||
mkdir -p .${projectName}.d/env
|
||||
touch .${projectName}.d/env/94-appsbase.sh
|
||||
# Fill out .singularity.d
|
||||
mkdir -p .singularity.d/env
|
||||
touch .singularity.d/env/94-appsbase.sh
|
||||
|
||||
cd ..
|
||||
mkdir -p /var/lib/${projectName}/mnt/session
|
||||
|
@ -21,14 +21,82 @@ let
|
||||
;
|
||||
in
|
||||
rec {
|
||||
# Base implementation for non-compiled executables.
|
||||
# Takes an interpreter, for example `${lib.getExe pkgs.bash}`
|
||||
#
|
||||
# Examples:
|
||||
# writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
|
||||
# makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo 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);
|
||||
/**
|
||||
A generic function that returns a derivation which, when beeing built outputs the script in an executable format.
|
||||
|
||||
# Inputs
|
||||
|
||||
config (AttrSet)
|
||||
: `interpreter` (String)
|
||||
: 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);
|
||||
let
|
||||
nameIsPath = types.path.check nameOrPath;
|
||||
@ -37,83 +105,146 @@ rec {
|
||||
# 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.
|
||||
inner =
|
||||
pkgs.runCommandLocal name (
|
||||
{
|
||||
inherit makeWrapperArgs;
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
];
|
||||
meta.mainProgram = name;
|
||||
}
|
||||
// (
|
||||
if (types.str.check content) then {
|
||||
inherit content interpreter;
|
||||
passAsFile = [ "content" ];
|
||||
} else {
|
||||
inherit interpreter;
|
||||
contentPath = content;
|
||||
pkgs.runCommandLocal name
|
||||
(
|
||||
{
|
||||
inherit makeWrapperArgs;
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
meta.mainProgram = name;
|
||||
}
|
||||
// (
|
||||
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
|
||||
# there doesn't seem to be a limit to the size of shebang and multiple
|
||||
# arguments to the interpreter are allowed.
|
||||
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
|
||||
''
|
||||
# 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
|
||||
# arguments to the interpreter are allowed.
|
||||
if [[ -n "${toString pkgs.stdenvNoCC.isDarwin}" ]] && isScript $interpreter
|
||||
then
|
||||
echo "error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported."
|
||||
exit 1
|
||||
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
|
||||
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
|
||||
|
||||
# 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
|
||||
echo "#! $interpreterLine" > $out
|
||||
cat "$contentPath" >> $out
|
||||
${optionalString (check != "") ''
|
||||
${check} $out
|
||||
''}
|
||||
chmod +x $out
|
||||
|
||||
echo "#! $interpreterLine" > $out
|
||||
cat "$contentPath" >> $out
|
||||
${optionalString (check != "") ''
|
||||
${check} $out
|
||||
''}
|
||||
chmod +x $out
|
||||
# Relocate executable
|
||||
# Wrap it if makeWrapperArgs are specified
|
||||
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
|
||||
'';
|
||||
|
||||
# Relocate executable
|
||||
# Wrap it if makeWrapperArgs are specified
|
||||
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
|
||||
'';
|
||||
/**
|
||||
This is a generic function that returns a derivation which, when built, compiles the given script into an executable format.
|
||||
|
||||
:::{.note}
|
||||
This function is the base implementation for other compile language `writers`.
|
||||
i.e. `writeHaskell`, `writeRust`.
|
||||
:::
|
||||
|
||||
# Base implementation for compiled executables.
|
||||
# Takes a compile script, which in turn takes the name as an argument.
|
||||
#
|
||||
# Examples:
|
||||
# writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; }
|
||||
makeBinWriter = { compileScript, strip ? true, makeWrapperArgs ? [] }: nameOrPath: content:
|
||||
assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
|
||||
# Inputs
|
||||
|
||||
config (AttrSet)
|
||||
: `compileScript` (String)
|
||||
: The script that compiles the given content into an executable.
|
||||
|
||||
: `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);
|
||||
let
|
||||
nameIsPath = types.path.check nameOrPath;
|
||||
@ -122,46 +253,46 @@ rec {
|
||||
# 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.
|
||||
inner =
|
||||
pkgs.runCommandLocal name (
|
||||
{
|
||||
inherit makeWrapperArgs;
|
||||
nativeBuildInputs = [
|
||||
makeBinaryWrapper
|
||||
];
|
||||
meta.mainProgram = name;
|
||||
}
|
||||
// (
|
||||
if (types.str.check content) then {
|
||||
inherit content;
|
||||
passAsFile = [ "content" ];
|
||||
} else {
|
||||
contentPath = content;
|
||||
}
|
||||
pkgs.runCommandLocal name
|
||||
(
|
||||
{
|
||||
inherit makeWrapperArgs;
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
meta.mainProgram = name;
|
||||
}
|
||||
// (
|
||||
if (types.str.check content) then
|
||||
{
|
||||
inherit content;
|
||||
passAsFile = [ "content" ];
|
||||
}
|
||||
else
|
||||
{ contentPath = content; }
|
||||
)
|
||||
)
|
||||
)
|
||||
''
|
||||
${compileScript}
|
||||
${lib.optionalString strip
|
||||
"${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}
|
||||
# Sometimes binaries produced for darwin (e. g. by GHC) won't be valid
|
||||
# mach-o executables from the get-go, but need to be corrected somehow
|
||||
# which is done by fixupPhase.
|
||||
${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}
|
||||
mv $out tmp
|
||||
mkdir -p $out/$(dirname "${path}")
|
||||
mv tmp $out/${path}
|
||||
if [ -n "''${makeWrapperArgs+''${makeWrapperArgs[@]}}" ]; then
|
||||
wrapProgram $out/${path} ''${makeWrapperArgs[@]}
|
||||
fi
|
||||
'';
|
||||
''
|
||||
${compileScript}
|
||||
${lib.optionalString strip "${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"}
|
||||
# Sometimes binaries produced for darwin (e. g. by GHC) won't be valid
|
||||
# mach-o executables from the get-go, but need to be corrected somehow
|
||||
# which is done by fixupPhase.
|
||||
${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"}
|
||||
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 {} ''
|
||||
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
|
||||
'';
|
||||
|
||||
@ -184,10 +315,12 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeBash = name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
|
||||
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.bash}"; }) name
|
||||
else makeScriptWriter { interpreter = "${lib.getExe pkgs.bash}"; } name argsOrScript;
|
||||
writeBash =
|
||||
name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
|
||||
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
|
||||
#
|
||||
@ -208,8 +341,7 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeBashBin = name:
|
||||
writeBash "/bin/${name}";
|
||||
writeBashBin = name: writeBash "/bin/${name}";
|
||||
|
||||
# Like writeScript but the first line is a shebang to dash
|
||||
#
|
||||
@ -230,10 +362,12 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeDash = name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
|
||||
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.dash}"; }) name
|
||||
else makeScriptWriter { interpreter = "${lib.getExe pkgs.dash}"; } name argsOrScript;
|
||||
writeDash =
|
||||
name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
|
||||
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
|
||||
#
|
||||
@ -254,8 +388,7 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeDashBin = name:
|
||||
writeDash "/bin/${name}";
|
||||
writeDashBin = name: writeDash "/bin/${name}";
|
||||
|
||||
# Like writeScript but the first line is a shebang to fish
|
||||
#
|
||||
@ -276,16 +409,21 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeFish = name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
|
||||
then makeScriptWriter (argsOrScript // {
|
||||
interpreter = "${lib.getExe pkgs.fish} --no-config";
|
||||
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
|
||||
}) name
|
||||
else makeScriptWriter {
|
||||
interpreter = "${lib.getExe pkgs.fish} --no-config";
|
||||
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
|
||||
} name argsOrScript;
|
||||
writeFish =
|
||||
name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
|
||||
makeScriptWriter (
|
||||
argsOrScript
|
||||
// {
|
||||
interpreter = "${lib.getExe pkgs.fish} --no-config";
|
||||
check = "${lib.getExe pkgs.fish} --no-config --no-execute"; # syntax check only
|
||||
}
|
||||
) 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
|
||||
#
|
||||
@ -306,8 +444,7 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeFishBin = name:
|
||||
writeFish "/bin/${name}";
|
||||
writeFishBin = name: writeFish "/bin/${name}";
|
||||
|
||||
# writeHaskell takes a name, an attrset with libraries and haskell version (both optional)
|
||||
# and some haskell source code and returns an executable.
|
||||
@ -318,30 +455,32 @@ rec {
|
||||
#
|
||||
# main = launchMissiles
|
||||
# '';
|
||||
writeHaskell = name: {
|
||||
ghc ? pkgs.ghc,
|
||||
ghcArgs ? [],
|
||||
libraries ? [],
|
||||
makeWrapperArgs ? [],
|
||||
strip ? true,
|
||||
threadedRuntime ? true,
|
||||
}:
|
||||
writeHaskell =
|
||||
name:
|
||||
{
|
||||
ghc ? pkgs.ghc,
|
||||
ghcArgs ? [ ],
|
||||
libraries ? [ ],
|
||||
makeWrapperArgs ? [ ],
|
||||
strip ? true,
|
||||
threadedRuntime ? true,
|
||||
}:
|
||||
let
|
||||
appendIfNotSet = el: list: if elem el list then list else list ++ [ el ];
|
||||
ghcArgs' = if threadedRuntime then appendIfNotSet "-threaded" ghcArgs else ghcArgs;
|
||||
|
||||
in makeBinWriter {
|
||||
in
|
||||
makeBinWriter {
|
||||
compileScript = ''
|
||||
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
|
||||
'';
|
||||
inherit makeWrapperArgs strip;
|
||||
} name;
|
||||
|
||||
# writeHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)
|
||||
writeHaskellBin = name:
|
||||
writeHaskell "/bin/${name}";
|
||||
writeHaskellBin = name: writeHaskell "/bin/${name}";
|
||||
|
||||
# Like writeScript but the first line is a shebang to nu
|
||||
#
|
||||
@ -362,11 +501,14 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeNu = name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && ! lib.isDerivation argsOrScript
|
||||
then makeScriptWriter (argsOrScript // { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; }) name
|
||||
else makeScriptWriter { interpreter = "${lib.getExe pkgs.nushell} --no-config-file"; } name argsOrScript;
|
||||
|
||||
writeNu =
|
||||
name: argsOrScript:
|
||||
if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then
|
||||
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
|
||||
#
|
||||
@ -387,25 +529,27 @@ rec {
|
||||
# ''
|
||||
# hello
|
||||
# ''
|
||||
writeNuBin = name:
|
||||
writeNu "/bin/${name}";
|
||||
writeNuBin = name: writeNu "/bin/${name}";
|
||||
|
||||
# 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.
|
||||
makeRubyWriter = ruby: rubyPackages: buildRubyPackages: name: { libraries ? [], ... } @ args:
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args ["libraries"])
|
||||
// {
|
||||
interpreter =
|
||||
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" ''
|
||||
# exec ${lib.getExe buildRubyPackages.rubocop} "$1"
|
||||
#'');
|
||||
}
|
||||
) name;
|
||||
makeRubyWriter =
|
||||
ruby: rubyPackages: buildRubyPackages: name:
|
||||
{
|
||||
libraries ? [ ],
|
||||
...
|
||||
}@args:
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args [ "libraries" ])
|
||||
// {
|
||||
interpreter =
|
||||
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" ''
|
||||
# exec ${lib.getExe buildRubyPackages.rubocop} "$1"
|
||||
#'');
|
||||
}
|
||||
) name;
|
||||
|
||||
# Like writeScript but the first line is a shebang to ruby
|
||||
#
|
||||
@ -415,26 +559,32 @@ rec {
|
||||
# ''
|
||||
writeRuby = makeRubyWriter pkgs.ruby pkgs.rubyPackages buildPackages.rubyPackages;
|
||||
|
||||
writeRubyBin = name:
|
||||
writeRuby "/bin/${name}";
|
||||
writeRubyBin = name: writeRuby "/bin/${name}";
|
||||
|
||||
# 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,
|
||||
# lua.withPackages is used as interpreter, otherwise the "bare" lua is used.
|
||||
makeLuaWriter = lua: luaPackages: buildLuaPackages: name: { libraries ? [], ... } @ args:
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args ["libraries"])
|
||||
// {
|
||||
interpreter = lua.interpreter;
|
||||
makeLuaWriter =
|
||||
lua: luaPackages: buildLuaPackages: name:
|
||||
{
|
||||
libraries ? [ ],
|
||||
...
|
||||
}@args:
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args [ "libraries" ])
|
||||
// {
|
||||
interpreter = lua.interpreter;
|
||||
# if libraries == []
|
||||
# then lua.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.
|
||||
check = (writeDash "luacheck.sh" ''
|
||||
exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"
|
||||
'');
|
||||
}
|
||||
) name;
|
||||
check = (
|
||||
writeDash "luacheck.sh" ''
|
||||
exec ${buildLuaPackages.luacheck}/bin/luacheck "$1"
|
||||
''
|
||||
);
|
||||
}
|
||||
) name;
|
||||
|
||||
# writeLua takes a name an attributeset with libraries and some lua source code and
|
||||
# returns an executable (should also work with luajit)
|
||||
@ -458,28 +608,28 @@ rec {
|
||||
# ''
|
||||
writeLua = makeLuaWriter pkgs.lua pkgs.luaPackages buildPackages.luaPackages;
|
||||
|
||||
writeLuaBin = name:
|
||||
writeLua "/bin/${name}";
|
||||
writeLuaBin = name: writeLua "/bin/${name}";
|
||||
|
||||
writeRust = name: {
|
||||
makeWrapperArgs ? [],
|
||||
rustc ? pkgs.rustc,
|
||||
rustcArgs ? [],
|
||||
strip ? true,
|
||||
}:
|
||||
let
|
||||
darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ];
|
||||
in
|
||||
writeRust =
|
||||
name:
|
||||
{
|
||||
makeWrapperArgs ? [ ],
|
||||
rustc ? pkgs.rustc,
|
||||
rustcArgs ? [ ],
|
||||
strip ? true,
|
||||
}:
|
||||
let
|
||||
darwinArgs = lib.optionals stdenv.isDarwin [ "-L${lib.getLib libiconv}/lib" ];
|
||||
in
|
||||
makeBinWriter {
|
||||
compileScript = ''
|
||||
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;
|
||||
} name;
|
||||
|
||||
writeRustBin = name:
|
||||
writeRust "/bin/${name}";
|
||||
writeRustBin = name: writeRust "/bin/${name}";
|
||||
|
||||
# writeJS takes a name an attributeset with libraries and some JavaScript sourcecode and
|
||||
# returns an executable
|
||||
@ -491,23 +641,26 @@ rec {
|
||||
# var result = UglifyJS.minify(code);
|
||||
# console.log(result.code);
|
||||
# ''
|
||||
writeJS = name: { libraries ? [] }: content:
|
||||
let
|
||||
node-env = pkgs.buildEnv {
|
||||
name = "node";
|
||||
paths = libraries;
|
||||
pathsToLink = [
|
||||
"/lib/node_modules"
|
||||
];
|
||||
};
|
||||
in writeDash name ''
|
||||
export NODE_PATH=${node-env}/lib/node_modules
|
||||
exec ${lib.getExe pkgs.nodejs} ${pkgs.writeText "js" content} "$@"
|
||||
'';
|
||||
writeJS =
|
||||
name:
|
||||
{
|
||||
libraries ? [ ],
|
||||
}:
|
||||
content:
|
||||
let
|
||||
node-env = pkgs.buildEnv {
|
||||
name = "node";
|
||||
paths = libraries;
|
||||
pathsToLink = [ "/lib/node_modules" ];
|
||||
};
|
||||
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 = name:
|
||||
writeJS "/bin/${name}";
|
||||
writeJSBin = name: writeJS "/bin/${name}";
|
||||
|
||||
awkFormatNginx = builtins.toFile "awkFormat-nginx.awk" ''
|
||||
awk -f
|
||||
@ -515,18 +668,22 @@ rec {
|
||||
/\{/{ctx++;idx=1}
|
||||
/\}/{ctx--}
|
||||
{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
|
||||
# returns an executable
|
||||
#
|
||||
@ -535,42 +692,55 @@ rec {
|
||||
# use boolean;
|
||||
# print "Howdy!\n" if true;
|
||||
# ''
|
||||
writePerl = name: { libraries ? [], ... } @ args:
|
||||
writePerl =
|
||||
name:
|
||||
{
|
||||
libraries ? [ ],
|
||||
...
|
||||
}@args:
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args ["libraries"])
|
||||
(builtins.removeAttrs args [ "libraries" ])
|
||||
// {
|
||||
interpreter = "${lib.getExe (pkgs.perl.withPackages (p: libraries))}";
|
||||
}
|
||||
) name;
|
||||
|
||||
# writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)
|
||||
writePerlBin = name:
|
||||
writePerl "/bin/${name}";
|
||||
writePerlBin = name: writePerl "/bin/${name}";
|
||||
|
||||
# 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,
|
||||
# python.withPackages is used as interpreter, otherwise the "bare" python is used.
|
||||
makePythonWriter = python: pythonPackages: buildPythonPackages: name: { libraries ? [], flakeIgnore ? [], ... } @ args:
|
||||
let
|
||||
ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
|
||||
in
|
||||
makeScriptWriter
|
||||
(
|
||||
(builtins.removeAttrs args ["libraries" "flakeIgnore"])
|
||||
makePythonWriter =
|
||||
python: pythonPackages: buildPythonPackages: name:
|
||||
{
|
||||
libraries ? [ ],
|
||||
flakeIgnore ? [ ],
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
ignoreAttribute =
|
||||
optionalString (flakeIgnore != [ ])
|
||||
"--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
|
||||
in
|
||||
makeScriptWriter (
|
||||
(builtins.removeAttrs args [
|
||||
"libraries"
|
||||
"flakeIgnore"
|
||||
])
|
||||
// {
|
||||
interpreter =
|
||||
if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then
|
||||
if libraries == []
|
||||
then python.interpreter
|
||||
else (python.withPackages (ps: libraries)).interpreter
|
||||
else python.interpreter
|
||||
;
|
||||
check = optionalString python.isPy3k (writeDash "pythoncheck.sh" ''
|
||||
exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
|
||||
'');
|
||||
if libraries == [ ] then python.interpreter else (python.withPackages (ps: libraries)).interpreter
|
||||
else
|
||||
python.interpreter;
|
||||
check = optionalString python.isPy3k (
|
||||
writeDash "pythoncheck.sh" ''
|
||||
exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
|
||||
''
|
||||
);
|
||||
}
|
||||
)
|
||||
name;
|
||||
) name;
|
||||
|
||||
# writePyPy2 takes a name an attributeset with libraries and some pypy2 sourcecode and
|
||||
# returns an executable
|
||||
@ -587,8 +757,7 @@ rec {
|
||||
writePyPy2 = makePythonWriter pkgs.pypy2 pkgs.pypy2Packages buildPackages.pypy2Packages;
|
||||
|
||||
# writePyPy2Bin takes the same arguments as writePyPy2 but outputs a directory (like writeScriptBin)
|
||||
writePyPy2Bin = name:
|
||||
writePyPy2 "/bin/${name}";
|
||||
writePyPy2Bin = name: writePyPy2 "/bin/${name}";
|
||||
|
||||
# writePython3 takes a name an attributeset with libraries and some python3 sourcecode and
|
||||
# returns an executable
|
||||
@ -605,8 +774,7 @@ rec {
|
||||
writePython3 = makePythonWriter pkgs.python3 pkgs.python3Packages buildPackages.python3Packages;
|
||||
|
||||
# writePython3Bin takes the same arguments as writePython3 but outputs a directory (like writeScriptBin)
|
||||
writePython3Bin = name:
|
||||
writePython3 "/bin/${name}";
|
||||
writePython3Bin = name: writePython3 "/bin/${name}";
|
||||
|
||||
# writePyPy3 takes a name an attributeset with libraries and some pypy3 sourcecode and
|
||||
# returns an executable
|
||||
@ -623,46 +791,60 @@ rec {
|
||||
writePyPy3 = makePythonWriter pkgs.pypy3 pkgs.pypy3Packages buildPackages.pypy3Packages;
|
||||
|
||||
# writePyPy3Bin takes the same arguments as writePyPy3 but outputs a directory (like writeScriptBin)
|
||||
writePyPy3Bin = name:
|
||||
writePyPy3 "/bin/${name}";
|
||||
writePyPy3Bin = 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:
|
||||
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; };
|
||||
nuget-source = mkNugetSource {
|
||||
name = "${fname}-nuget-source";
|
||||
description = "Nuget source with the dependencies for ${fname}";
|
||||
deps = [ _nugetDeps ];
|
||||
};
|
||||
|
||||
nuget-source = mkNugetSource {
|
||||
name = "${fname}-nuget-source";
|
||||
description = "Nuget source with the dependencies for ${fname}";
|
||||
deps = [ _nugetDeps ];
|
||||
};
|
||||
fsi = writeBash "fsi" ''
|
||||
export HOME=$NIX_BUILD_TOP/.home
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
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" ''
|
||||
export HOME=$NIX_BUILD_TOP/.home
|
||||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_NOLOGO=1
|
||||
script="$1"; shift
|
||||
${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} "$@" < "$script"
|
||||
'';
|
||||
in
|
||||
content:
|
||||
makeScriptWriter
|
||||
(
|
||||
(builtins.removeAttrs args [
|
||||
"dotnet-sdk"
|
||||
"fsi-flags"
|
||||
"libraries"
|
||||
])
|
||||
// {
|
||||
interpreter = fsi;
|
||||
}
|
||||
)
|
||||
path
|
||||
''
|
||||
#i "nuget: ${nuget-source}/lib"
|
||||
${content}
|
||||
exit 0
|
||||
'';
|
||||
|
||||
in content: makeScriptWriter (
|
||||
(builtins.removeAttrs args ["dotnet-sdk" "fsi-flags" "libraries"])
|
||||
// {
|
||||
interpreter = fsi;
|
||||
}
|
||||
) path
|
||||
''
|
||||
#i "nuget: ${nuget-source}/lib"
|
||||
${ content }
|
||||
exit 0
|
||||
'';
|
||||
writeFSharp = makeFSharpWriter { };
|
||||
|
||||
writeFSharp =
|
||||
makeFSharpWriter {};
|
||||
|
||||
writeFSharpBin = name:
|
||||
writeFSharp "/bin/${name}";
|
||||
writeFSharpBin = name: writeFSharp "/bin/${name}";
|
||||
}
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "api-linter";
|
||||
version = "1.67.0";
|
||||
version = "1.67.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "googleapis";
|
||||
repo = "api-linter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-B98YFQYjBzHmKTc3yowT9JfWe8fiOVu0pFyyrwKk3Ws=";
|
||||
hash = "sha256-nbLaLi3Uh/zU+SPHA2x8cMic/bOKBo9wybK3b1LHNpY=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-+dyoWK5iXH480c+akg26BCF/J8lKQoATVqZUfqMa080=";
|
||||
|
@ -8,7 +8,8 @@
|
||||
ffmpeg-full,
|
||||
util-linux,
|
||||
python3,
|
||||
getopt
|
||||
getopt,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
let
|
||||
@ -28,7 +29,7 @@ let
|
||||
pname = "${pname}-client";
|
||||
inherit (source) version;
|
||||
|
||||
src = runCommand "cp-source" {} ''
|
||||
src = runCommand "cp-source" { } ''
|
||||
cp -r ${src}/client $out
|
||||
'';
|
||||
|
||||
@ -41,13 +42,28 @@ let
|
||||
};
|
||||
|
||||
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 (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 ];
|
||||
nativeBuildInputs = [ python3 ];
|
||||
|
||||
@ -67,15 +83,21 @@ in buildNpmPackage {
|
||||
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/";
|
||||
description = "Self-hosted audiobook and podcast server";
|
||||
changelog = "https://github.com/advplyr/audiobookshelf/releases/tag/v${source.version}";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.jvanbruegge maintainers.adamcstephens ];
|
||||
platforms = platforms.linux;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [
|
||||
jvanbruegge
|
||||
adamcstephens
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "audiobookshelf";
|
||||
};
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"owner": "advplyr",
|
||||
"repo": "audiobookshelf",
|
||||
"rev": "e81b3461b2b6374d2868fd415a7bbb899bd2f837",
|
||||
"hash": "sha256-q3XDEi5DNvXxgcLYm4vI3my3wHPAjHMmEO1eiYD38Pw=",
|
||||
"version": "2.12.2",
|
||||
"depsHash": "sha256-XUKqkrh+RzTmPckh2YAcdu5sfO7HRw1fuYOlPeePZ7w=",
|
||||
"clientDepsHash": "sha256-A5cnzb+/ImpCb/pPTZN+puf3FDKkD+dB+T6KLJcbx5w="
|
||||
"rev": "52a3bc224ae7c79fbb543716a25b731c65a8f76a",
|
||||
"hash": "sha256-SbpoCtd5PJ6fU9muy58J4VxlbKiJM0OfMALHC5DUqFc=",
|
||||
"version": "2.12.3",
|
||||
"depsHash": "sha256-8YUGM+MPYFLpLwWe3W+eObxH4ZklDVGj8bDYkSWTzQg=",
|
||||
"clientDepsHash": "sha256-8xE1M7InH+Rxjpb2rsdvC3LcLV+k8a83BKWCis5P+tY="
|
||||
}
|
||||
|
@ -9,16 +9,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "clipcat";
|
||||
version = "0.18.1";
|
||||
version = "0.18.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xrelkd";
|
||||
repo = pname;
|
||||
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 [
|
||||
darwin.apple_sdk.frameworks.Cocoa
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gh-i";
|
||||
version = "0.0.7";
|
||||
version = "0.0.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gennaro-tedesco";
|
||||
repo = "gh-i";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-nVMWeXssSpfWsD20+qLvQp6Wlrp/DiVNLBR6qnvuD2M=";
|
||||
hash = "sha256-fW9T7B/97kI8zjaTvJHOkEUGVVM+ysOxZzqVNeOfVkc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-TSl+7N3W3BeW8UWxUdTv3cob2P7eLvO+80BLqcbhanQ=";
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gh-markdown-preview";
|
||||
version = "1.6.0";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yusukebe";
|
||||
repo = "gh-markdown-preview";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-WOdcivT9s1yFOF6oXMaIay4i/zOhlBLxCaID8H3hnJw=";
|
||||
hash = "sha256-yfl50izjjyPmyV0Er0al/PPd87Yizqc8PnFV/FMpfEU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-O6Q9h5zcYAoKLjuzGu7f7UZY0Y5rL2INqFyJT2QZJ/E=";
|
||||
|
@ -8,16 +8,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "git-spice";
|
||||
version = "0.3.1";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abhinav";
|
||||
repo = "git-spice";
|
||||
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 = [ "." ];
|
||||
|
||||
|
@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gogup";
|
||||
version = "0.27.3";
|
||||
version = "0.27.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nao1215";
|
||||
repo = "gup";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8DtD22kvGez2iX0VqoZ1zSydcNYnDz3r698nXEwtoZE=";
|
||||
hash = "sha256-vCp513WpB3kWMN0nkohtvpuMN1WBndg1E6pF0Cd5FgE=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-yqCmo33ihkaPK8iL5cnCIGbOLkdXjuIWLwtgAa+KB8Y=";
|
||||
vendorHash = "sha256-rtdbPwVZHwofpGccYU8NBiaikzNMIwSDggbRdnGTBu8=";
|
||||
doCheck = false;
|
||||
|
||||
ldflags = [
|
||||
|
@ -6,15 +6,15 @@
|
||||
}:
|
||||
|
||||
let
|
||||
timestamp = "202406271335";
|
||||
timestamp = "202408011337";
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "jdt-language-server";
|
||||
version = "1.37.0";
|
||||
version = "1.38.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.eclipse.org/jdtls/milestones/${finalAttrs.version}/jdt-language-server-${finalAttrs.version}-${timestamp}.tar.gz";
|
||||
hash = "sha256-0EzZ9N9FzoWunPSVMMcqGjJLFO7nR68m4zdFAONrW9A=";
|
||||
hash = "sha256-uml3iKGfK6V7FjAqums0PGSZKMlfdrDRcElKwS0XrHg=";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
@ -20,16 +20,16 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "kanidm";
|
||||
version = "1.2.3";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
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}";
|
||||
|
||||
@ -41,13 +41,15 @@ rustPlatform.buildRustPackage rec {
|
||||
cpu_flags = if stdenv.isx86_64 then "x86_64_legacy" else "none";
|
||||
default_config_path = "/etc/kanidm/server.toml";
|
||||
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@";
|
||||
};
|
||||
in
|
||||
''
|
||||
cp ${format profile} 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 = [
|
||||
@ -67,8 +69,9 @@ rustPlatform.buildRustPackage rec {
|
||||
postBuild = ''
|
||||
# We don't compile the wasm-part form source, as there isn't a rustc for
|
||||
# wasm32-unknown-unknown in nixpkgs yet.
|
||||
mkdir $out
|
||||
cp -r server/web_ui/pkg $out/ui
|
||||
mkdir -p $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
|
||||
|
@ -10,16 +10,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "live-server";
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lomirus";
|
||||
repo = "live-server";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-BSAsD9nRlHaTDbBpLBxN9OOQ9SekRwQeYUWV1CZO4oY=";
|
||||
hash = "sha256-VsM77cEAjX12qCHS9fvImloY05b+swg7mabPd655C+s=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-RwueYpa/CMriSOWwGZhkps6jHmqOdRuz+ECRq/ThPs0=";
|
||||
cargoHash = "sha256-a4yDHZm9LBNuwOrxra4da7u/2RNXry4UYPVDGu9eGxo=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
@ -9,12 +9,12 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.9.0";
|
||||
version = "1.11.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mealie-recipes";
|
||||
repo = "mealie";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gg7ClclBS9j9n4/3HLxbX8HXTz9Zw5+BYG2MEYRsRBU=";
|
||||
hash = "sha256-tBbvmM66zCNpKqeekPY48j0t5PjLHeyQ8+kJ6755ivo=";
|
||||
};
|
||||
|
||||
frontend = callPackage (import ./mealie-frontend.nix src version) { };
|
||||
@ -93,8 +93,16 @@ pythonpkgs.buildPythonPackage rec {
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
rm -rf dev # Do not need dev scripts & code
|
||||
|
||||
substituteInPlace mealie/__init__.py \
|
||||
--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
|
||||
@ -106,10 +114,10 @@ pythonpkgs.buildPythonPackage rec {
|
||||
${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py
|
||||
'';
|
||||
in ''
|
||||
mkdir -p $out/config $out/bin $out/libexec
|
||||
mkdir -p $out/bin $out/libexec
|
||||
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'
|
||||
|
||||
makeWrapper ${start_script} $out/bin/mealie \
|
||||
|
@ -5,13 +5,13 @@
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "nerdfetch";
|
||||
version = "8.2.0";
|
||||
version = "8.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ThatOneCalculator";
|
||||
repo = "NerdFetch";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-fSITel2WhlmKx+wMNKfur3zDqKYJs5+AZNJBd2MtGRw=";
|
||||
hash = "sha256-9S7mS+lUCT8/Q65fqlrnTksuK3mhynPX+jWPaV8U8Dg=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "openapi-changes";
|
||||
version = "0.0.66";
|
||||
version = "0.0.67";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pb33f";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KacN/j6mc6eUovFfKLgu86pZBde5zRjhjuJyny6IjZU=";
|
||||
hash = "sha256-SNH11z/0DeaYfGwBKW3iIeCVdlpcoZ1elIlgl+quWIY=";
|
||||
};
|
||||
|
||||
# this test requires the `.git` of the project to be present
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "quill-log";
|
||||
version = "6.0.0";
|
||||
version = "6.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "odygrd";
|
||||
repo = "quill";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hYnpMgxhL8TIkOzhxf4I/Eeix+BRecNYynuGPm/QwbA=";
|
||||
hash = "sha256-6m3ijZlQ8NB+uGtsxAfLgryKUwlroqexK3IuC2FG3J4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
@ -12,16 +12,16 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "railway";
|
||||
version = "3.11.2";
|
||||
version = "3.11.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "railwayapp";
|
||||
repo = "cli";
|
||||
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 ];
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
renode.overrideAttrs (finalAttrs: _: {
|
||||
pname = "renode-unstable";
|
||||
version = "1.15.1+20240801git19eb5fb22";
|
||||
version = "1.15.1+20240808git7a138330e";
|
||||
|
||||
src = fetchurl {
|
||||
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 =
|
||||
|
@ -5,6 +5,7 @@
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
gtkmm3,
|
||||
libGL,
|
||||
libX11,
|
||||
libXdmcp,
|
||||
libXext,
|
||||
@ -87,6 +88,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--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 = ''
|
||||
cd ${if withGtk then "gtk" else "unix"}
|
||||
'';
|
||||
@ -126,6 +134,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
AndersonTorres
|
||||
qknight
|
||||
thiagokokada
|
||||
sugar700
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
broken = (withGtk && stdenv.isDarwin);
|
||||
|
@ -1,25 +1,25 @@
|
||||
{
|
||||
"version": "0.129.0",
|
||||
"version": "0.130.0",
|
||||
"binaries": {
|
||||
"aarch64-darwin": {
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/darwin/arm64/yc",
|
||||
"hash": "sha256-ULd/fmWDBPPALf6Rb95n6zXsSuDBAkeWNH11f5PLIpE="
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/darwin/arm64/yc",
|
||||
"hash": "sha256-nvEu2aV9ykG9j6p9+kW4bBGOoj5FzJD8eU1M9dFXF5I="
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/arm64/yc",
|
||||
"hash": "sha256-Tvy9hTpp37EUrEIDglNFqrH0laD0O+wwVWlCIBh6Jag="
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/arm64/yc",
|
||||
"hash": "sha256-qZajFYaDVV+XcxC28MoRtIPaCm2He58p+yRMOrFhQU4="
|
||||
},
|
||||
"i686-linux": {
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/386/yc",
|
||||
"hash": "sha256-rmcXdz7z1iXOUQTq0sFNNcZ1jG/Dypxfl2oyeJiwkjs="
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/386/yc",
|
||||
"hash": "sha256-RhDZ2VnmO+GrKQ0SIFwyCqPxnfUc5VoGlgg8uJncERY="
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/darwin/amd64/yc",
|
||||
"hash": "sha256-DjAifjGBiRvJDx3j4iMR/t7zOITaz/iulfeDUZCvIhE="
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/darwin/amd64/yc",
|
||||
"hash": "sha256-hGdInZAo+LH6qzoQXDmfSzVb1SdN565XuRGByzJrrfI="
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.129.0/linux/amd64/yc",
|
||||
"hash": "sha256-igj1iwznsL1OG3V8hOQVCbticzOtDH8dF8jLzMxO5Fg="
|
||||
"url": "https://storage.yandexcloud.net/yandexcloud-yc/release/0.130.0/linux/amd64/yc",
|
||||
"hash": "sha256-0NwGi46WtOV/2oJJPiXIj0+39dKno2LlsVuWEFVycTI="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,12 +38,19 @@ finalAttrs: prevAttrs: {
|
||||
++ lists.optionals finalAttrs.passthru.useCudatoolkitRunfile [ final.cudatoolkit ]
|
||||
++ 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.
|
||||
postFixup = strings.optionalString (strings.versionAtLeast finalAttrs.version "8.0.5.0") ''
|
||||
${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so
|
||||
${meta.getExe' patchelf "patchelf"} $lib/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so
|
||||
'';
|
||||
postFixup =
|
||||
strings.optionalString
|
||||
(
|
||||
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";
|
||||
|
||||
|
@ -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";
|
||||
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";
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -428,6 +428,12 @@ self: super: {
|
||||
# (this should be possible by also taking PREFIX into account).
|
||||
./patches/git-annex-no-usr-prefix.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail 'InstallDesktopFile $(PREFIX)/bin/git-annex' \
|
||||
'InstallDesktopFile git-annex'
|
||||
'';
|
||||
}) super.git-annex;
|
||||
|
||||
# Too strict bounds on servant
|
||||
|
@ -12,17 +12,17 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "lune";
|
||||
version = "0.8.6";
|
||||
version = "0.8.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "filiptibell";
|
||||
repo = "lune";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-03ckR2FpSlaAZlhjyX3ob+7W5Pq8OLri7jT+XIM7oeQ=";
|
||||
hash = "sha256-fWfBXcJq8WBYPu0/VKksbC5q9lKzf0psjBNMlAq/iig=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoHash = "sha256-xEUq3Cc15bUAXpUoZw8tNQo6tW3/VXeuOtjIW4zrh1Q=";
|
||||
cargoHash = "sha256-+T5+rG4mxhAB/67DXQ6y+uK7A1Mbksc2BYaz4yOkLcA=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nelua";
|
||||
version = "0-unstable-2024-06-16";
|
||||
version = "0-unstable-2024-08-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "edubart";
|
||||
repo = "nelua-lang";
|
||||
rev = "4b2c75f8fe5c1d11a966b2fe8974a256868749a6";
|
||||
hash = "sha256-98QKg9eKBDEobmARpH3FAS2C32iViSsBs71n1E8uI2s=";
|
||||
rev = "38c2d9ca14c992ddcd73f4067af8c6f37c550979";
|
||||
hash = "sha256-mpKGD9YP+D+1ySq+8lyRjXwptWL+uBG/p37bHDBoTJ8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -93,9 +93,9 @@ in {
|
||||
major = "3";
|
||||
minor = "13";
|
||||
patch = "0";
|
||||
suffix = "b4";
|
||||
suffix = "rc1";
|
||||
};
|
||||
hash = "sha256-sqpVfDyHUjOr2vGxJChOXVD2uyONYqi1XxLcks6hlT8=";
|
||||
hash = "sha256-Z4uIR3XuwCJNUVn6kAh5AgusoqNs6UL9lf6/oa20pr0=";
|
||||
inherit (darwin) configd;
|
||||
inherit passthruFun;
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aioopenexchangerates";
|
||||
version = "0.4.15";
|
||||
version = "0.4.16";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@ -22,7 +22,7 @@ buildPythonPackage rec {
|
||||
owner = "MartinHjelmare";
|
||||
repo = "aioopenexchangerates";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-WKXxCa3wUTvLaN12EZE4l/hTTzSe291lnNLrspwUCs4=";
|
||||
hash = "sha256-cSHqlFzZiQ0CCH+rPDqPulrLPuE6BB7Qd+wWb4ZWPtk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiortm";
|
||||
version = "0.8.15";
|
||||
version = "0.8.17";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@ -25,7 +25,7 @@ buildPythonPackage rec {
|
||||
owner = "MartinHjelmare";
|
||||
repo = "aiortm";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-eWky7jZ8QoH467R/9+3aQYyOKAC74aMeZeasTEX61zg=";
|
||||
hash = "sha256-iZYzERIJslbvmW+4yeHQvXt1EEyZcSR6+qYdpo9EmAg=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cmsdials";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cms-DQM";
|
||||
repo = "dials-py";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-664FvPdZFU5eTcMadnHfs0ZeiKqTH+Gy2bnhIFQxU2o=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-tV802rz8V9zkjxOoGDXuYGD9FNWjdPb3Grp2khwxC9I=";
|
||||
};
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "fireflyalgorithm";
|
||||
version = "0.4.4";
|
||||
version = "0.4.5";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = "firefly-cpp";
|
||||
repo = "FireflyAlgorithm";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-xsTgSHBtN4gGw+9YvprcLubnCXSNRdn4abcz391cMEE=";
|
||||
hash = "sha256-dJnjeJN9NI8G/haYeOiMtAl56cExqMk0iTWpaybl4nE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
|
46
pkgs/development/python-modules/heatmiserv3/default.nix
Normal file
46
pkgs/development/python-modules/heatmiserv3/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -1472,7 +1472,7 @@ checksum = "9106e1d747ffd48e6be5bb2d97fa706ed25b144fbee4d5c02eae110cd8d6badd"
|
||||
|
||||
[[package]]
|
||||
name = "macos-certificate-truster"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
dependencies = [
|
||||
"security-framework",
|
||||
]
|
||||
@ -1563,7 +1563,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mitm-wg-test-client"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"boringtun",
|
||||
@ -1574,7 +1574,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mitmproxy"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"boringtun",
|
||||
@ -1610,7 +1610,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mitmproxy_rs"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"boringtun",
|
||||
@ -3000,7 +3000,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows-redirector"
|
||||
version = "0.6.2"
|
||||
version = "0.6.3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"env_logger",
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mitmproxy-rs";
|
||||
version = "0.6.2";
|
||||
version = "0.6.3";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitmproxy";
|
||||
repo = "mitmproxy_rs";
|
||||
rev = version;
|
||||
hash = "sha256-zBlt83mtJOsVqskDAkpk50yZHxJO6B8QP7iv8L1YPWA=";
|
||||
hash = "sha256-rnM2MNJ9ZVmwFjhXU8kPEQjpqNIzVZ3bVtm43WvGj5E=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.importCargoLock {
|
||||
@ -47,7 +47,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "Rust bits in mitmproxy";
|
||||
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;
|
||||
inherit (mitmproxy.meta) maintainers;
|
||||
};
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mitmproxy";
|
||||
version = "10.4.0";
|
||||
version = "10.4.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@ -54,7 +54,7 @@ buildPythonPackage rec {
|
||||
owner = "mitmproxy";
|
||||
repo = "mitmproxy";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-W+m7PVphj4sP5+Um7dtPbdnaZ+edZn/fcE4XJGX1E6M=";
|
||||
hash = "sha256-1OMVgV6dFKoG/upv+RWbYqftqejeQLBlsycuy2+Na6E=";
|
||||
};
|
||||
|
||||
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "particle";
|
||||
version = "0.24.0";
|
||||
version = "0.25.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-irS13UVHui2ug1SVWkNSEIkqV13/RvMjysbPQGALl2o=";
|
||||
hash = "sha256-ji1fo2VV5q8hi2bpe5WFsdT1IIV4XZbAZ3NvCy5X9a0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyads";
|
||||
version = "3.4.0";
|
||||
version = "3.4.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -19,7 +19,7 @@ buildPythonPackage rec {
|
||||
owner = "stlehmann";
|
||||
repo = "pyads";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-HJ/dlRuwFSY5j/mAp6rLMlTV59GFwrTV27n73TWlCUo=";
|
||||
hash = "sha256-OvDh92fwHW+UzEO5iqVOY7d5H0Es6CJK/f/HCyLO9J4=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
@ -20,13 +20,13 @@
|
||||
toPythonModule (
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pygmo";
|
||||
version = "2.19.6";
|
||||
version = "2.19.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "esa";
|
||||
repo = "pygmo2";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-umXK8LGJJ6Xj6UbJ5k/DM/nYayjl+jBXtjar5/dWqFM=";
|
||||
hash = "sha256-279KNnP11f5ob2senIVmbnlmhRp2p3RoZLsQRE6yJ5Q=";
|
||||
};
|
||||
|
||||
cmakeFlags = [ "-DPYGMO_INSTALL_PATH=${placeholder "out"}/${python.sitePackages}" ];
|
||||
|
@ -7,12 +7,12 @@
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
pname = "sabctools";
|
||||
version = "8.2.4";
|
||||
version = "8.2.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-qPi/+Q+xLm+djlYeTXyVi3q/R1zEtXgOY7wxLjnp7Ew=";
|
||||
hash = "sha256-ZEC813/JpGPEFL+nXKFAXFfUrrhECCIqONe27LwS00g=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
@ -20,15 +20,15 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "scikit-tda";
|
||||
version = "1.0.0";
|
||||
version = "1.1.1";
|
||||
format = "setuptools";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scikit-tda";
|
||||
repo = "scikit-tda";
|
||||
rev = "v${version}";
|
||||
sha256 = "0yhmf5jmxywyj6l9q0rfv9r8wpdk063fvvfnb4azwwccblgz37rj";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-sf7UxCFJZlIMGOgNFwoh/30U7xsBCZuJ3eumsjEelMc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "yolink-api";
|
||||
version = "0.4.6";
|
||||
version = "0.4.7";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
||||
owner = "YoSmart-Inc";
|
||||
repo = "yolink-api";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-A5cFz1u2b6mlE4NtMRQU3lruNqNWTYXH+tMvkH/zfUw=";
|
||||
hash = "sha256-VJqKORyAlTBIRsHaeUrLDuvVAU/EX/Zzh8u7xxmD2IE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "cpm-cmake";
|
||||
version = "0.40.1";
|
||||
version = "0.40.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cpm-cmake";
|
||||
repo = "cpm.cmake";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-9yXBk0j9SNdQ+V2RVWhPlOXaX/S7OQDEVdnb2XehT9E=";
|
||||
hash = "sha256-KIRVztkE72juIgXquZlC6AYo78QKHBD7iCvCa+ri66k=";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "goa";
|
||||
version = "3.18.0";
|
||||
version = "3.18.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "goadesign";
|
||||
repo = "goa";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-hteD8wxpkw27tduBUYkCIE+vgN/ggkIezEgFWqSuxbo=";
|
||||
hash = "sha256-TBGCykHW++o2t4NFbWS3IK+UpXbyGgaJZ/6aoCrqi2Q=";
|
||||
};
|
||||
vendorHash = "sha256-AwpPuj/nX8MD//JL/oF+RGGQi1fdUo28KII2+y5Ptso=";
|
||||
|
||||
|
@ -7,16 +7,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "operator-sdk";
|
||||
version = "1.36.0";
|
||||
version = "1.36.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "operator-framework";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-TdA0kqRDg0nSHbcqlZSzVyFL0hIwuv9rL98hftaWHe0=";
|
||||
hash = "sha256-ZUWbM2g3l5uesM9QDlRqRo9gFipgaS8YyEbnIyRaMS0=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-+VA9xq1ilZ/NOrnEOIvw5YWcmAsqZKfQMGz9vPVNmzU=";
|
||||
vendorHash = "sha256-FEoAV3Fhmjhkc7sYfE1QQFmhOZbXps57mBD0fyvQq00=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
|
@ -5,16 +5,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-careful";
|
||||
version = "0.4.2";
|
||||
version = "0.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RalfJung";
|
||||
repo = "cargo-careful";
|
||||
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; {
|
||||
description = "Tool to execute Rust code carefully, with extra checking along the way";
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "nile";
|
||||
version = "1.1.0-unstable-2024-07-15";
|
||||
version = "1.1.1-unstable-2024-08-07";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "imLinguin";
|
||||
repo = "nile";
|
||||
rev = "55287cd81b7993e9ed86e5efb9d71566de02bd40";
|
||||
hash = "sha256-sobhVggh8/BuKZWh39T0VJxg6kqADbC4AzeA32FQWN0=";
|
||||
rev = "9ce614f82a550a714ae55c4365658dba7bb1bb15";
|
||||
hash = "sha256-7EzU8aUYiYe1eXFs6nE1qchlMzIKh2U09uIGmiN32xM=";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
@ -1583,7 +1583,8 @@
|
||||
pycec
|
||||
];
|
||||
"heatmiser" = ps: with ps; [
|
||||
]; # missing inputs: heatmiserV3
|
||||
heatmiserv3
|
||||
];
|
||||
"heiwa" = ps: with ps; [
|
||||
];
|
||||
"heos" = ps: with ps; [
|
||||
|
@ -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
|
||||
|
73
pkgs/servers/ldap/lldap/Cargo.lock
generated
73
pkgs/servers/ldap/lldap/Cargo.lock
generated
@ -233,7 +233,7 @@ dependencies = [
|
||||
"serde_urlencoded",
|
||||
"smallvec",
|
||||
"socket2",
|
||||
"time 0.3.19",
|
||||
"time 0.3.36",
|
||||
"url",
|
||||
]
|
||||
|
||||
@ -395,7 +395,7 @@ dependencies = [
|
||||
"num-traits",
|
||||
"rusticata-macros",
|
||||
"thiserror",
|
||||
"time 0.3.19",
|
||||
"time 0.3.36",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -799,7 +799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
"time 0.3.19",
|
||||
"time 0.3.36",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
@ -1090,6 +1090,15 @@ dependencies = [
|
||||
"rusticata-macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deranged"
|
||||
version = "0.3.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
|
||||
dependencies = [
|
||||
"powerfmt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derivative"
|
||||
version = "2.2.0"
|
||||
@ -1351,8 +1360,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9"
|
||||
dependencies = [
|
||||
"atomic",
|
||||
"parking_lot",
|
||||
"pear",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"toml",
|
||||
"uncased",
|
||||
"version_check",
|
||||
@ -2364,9 +2375,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ldap3_proto"
|
||||
version = "0.4.0"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db993ebb4a1acda7ac25fa7e8609cff225a65f1f4a668e378eb252a1a6de433a"
|
||||
checksum = "a29eca0a9fef365d6d376a1b262e269a17b1c8c6de2cee76618642cd3c923506"
|
||||
dependencies = [
|
||||
"base64 0.21.0",
|
||||
"bytes",
|
||||
@ -2453,7 +2464,7 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
||||
|
||||
[[package]]
|
||||
name = "lldap"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1-alpha"
|
||||
dependencies = [
|
||||
"actix",
|
||||
"actix-files",
|
||||
@ -2473,6 +2484,7 @@ dependencies = [
|
||||
"clap",
|
||||
"cron",
|
||||
"derive_builder",
|
||||
"derive_more",
|
||||
"figment",
|
||||
"figment_file_provider_adapter",
|
||||
"futures",
|
||||
@ -2509,7 +2521,7 @@ dependencies = [
|
||||
"sha2 0.10.6",
|
||||
"strum",
|
||||
"thiserror",
|
||||
"time 0.3.19",
|
||||
"time 0.3.36",
|
||||
"tokio",
|
||||
"tokio-rustls",
|
||||
"tokio-stream",
|
||||
@ -2528,7 +2540,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lldap_app"
|
||||
version = "0.5.0"
|
||||
version = "0.5.1-alpha"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.13.1",
|
||||
@ -2569,6 +2581,7 @@ dependencies = [
|
||||
"opaque-ke",
|
||||
"rand 0.8.5",
|
||||
"rust-argon2",
|
||||
"sea-orm",
|
||||
"serde",
|
||||
"sha2 0.9.9",
|
||||
"thiserror",
|
||||
@ -2818,6 +2831,12 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-conv"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.45"
|
||||
@ -3137,6 +3156,12 @@ version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
|
||||
|
||||
[[package]]
|
||||
name = "powerfmt"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
version = "0.2.17"
|
||||
@ -3735,9 +3760,9 @@ checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.152"
|
||||
version = "1.0.193"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
|
||||
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
@ -3765,13 +3790,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.152"
|
||||
version = "1.0.193"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
|
||||
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
"syn 2.0.32",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4357,11 +4382,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.19"
|
||||
version = "0.3.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53250a3b3fed8ff8fd988587d8925d26a83ac3845d9e03b220b37f34c2b8d6c2"
|
||||
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
||||
dependencies = [
|
||||
"deranged",
|
||||
"itoa",
|
||||
"num-conv",
|
||||
"powerfmt",
|
||||
"serde",
|
||||
"time-core",
|
||||
"time-macros",
|
||||
@ -4369,16 +4397,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "time-core"
|
||||
version = "0.1.0"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
|
||||
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
||||
|
||||
[[package]]
|
||||
name = "time-macros"
|
||||
version = "0.2.7"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a460aeb8de6dcb0f381e1ee05f1cd56fcf5a5f6eb8187ff3d8f0b11078d38b7c"
|
||||
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
||||
dependencies = [
|
||||
"num-conv",
|
||||
"time-core",
|
||||
]
|
||||
|
||||
@ -4893,9 +4922,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webpki"
|
||||
version = "0.22.1"
|
||||
version = "0.22.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e"
|
||||
checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f"
|
||||
dependencies = [
|
||||
"ring",
|
||||
"untrusted",
|
||||
@ -5127,7 +5156,7 @@ dependencies = [
|
||||
"oid-registry",
|
||||
"rusticata-macros",
|
||||
"thiserror",
|
||||
"time 0.3.19",
|
||||
"time 0.3.36",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -18,15 +18,15 @@ let
|
||||
cargoHash = "sha256-vcpxcRlW1OKoD64owFF6mkxSqmNrvY+y3Ckn5UwEQ50=";
|
||||
};
|
||||
|
||||
commonDerivationAttrs = rec {
|
||||
commonDerivationAttrs = {
|
||||
pname = "lldap";
|
||||
version = "0.5.0";
|
||||
version = "0.5.1-unstable-2024-08-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lldap";
|
||||
repo = "lldap";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-2MEfwppkS9l3iHPNlkJB4tJnma0xMi0AckLv6wpzy1Y=";
|
||||
rev = "4138963bee15f5423629c081ec88805d43b8235c";
|
||||
hash = "sha256-g/Y+StSQQiA+1O0yh2xIhBHO9/MjM4QW1DNQIABTHdI=";
|
||||
};
|
||||
|
||||
# `Cargo.lock` has git dependencies, meaning can't use `cargoHash`
|
||||
@ -38,6 +38,7 @@ let
|
||||
"yew_form-0.1.8" = "sha256-1n9C7NiFfTjbmc9B5bDEnz7ZpYJo9ZT8/dioRXJ65hc=";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
frontend = rustPlatform.buildRustPackage (commonDerivationAttrs // {
|
||||
@ -60,11 +61,10 @@ let
|
||||
});
|
||||
|
||||
in rustPlatform.buildRustPackage (commonDerivationAttrs // {
|
||||
|
||||
cargoBuildFlags = [ "-p" "lldap" "-p" "lldap_migration_tool" "-p" "lldap_set_password" ];
|
||||
|
||||
patches = [
|
||||
./static-frontend-path.patch
|
||||
./0001-parameterize-frontend-location.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -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));
|
||||
}
|
@ -5,14 +5,14 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "gyb";
|
||||
version = "1.81";
|
||||
version = "1.82";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GAM-team";
|
||||
repo = "got-your-back";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ViNOEH5wyAQRR56egRhh4JoP1PWOCr+rxFmqxfJiu+0=";
|
||||
hash = "sha256-eKeT2tVBK2DcTOEC6Tvo+igPXPOD1wy66+kr0ltnMIU=";
|
||||
};
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
|
@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "vault";
|
||||
version = "1.17.2";
|
||||
version = "1.17.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "vault";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-R8ubsBLpjkBxJaPQokwWKtCcUW45fTkA36JnXCXHkeA=";
|
||||
hash = "sha256-N5nJBMRaHzK7aMPSeLVmnItf3CuGeblDMsGLDEz8HZc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-dS8DYiXXXuDJ9shK07kRUv2JnZ0eFm5YK2k470vwW/I=";
|
||||
vendorHash = "sha256-yy6bk86o/Q8KgggVJd8VCErG1txNbGsEuozyDa6IrCA=";
|
||||
|
||||
proxyVendor = true;
|
||||
|
||||
|
@ -1608,6 +1608,7 @@ mapAliases ({
|
||||
zfsStable = zfs; # Added 2024-02-26
|
||||
zfsUnstable = zfs_unstable; # Added 2024-02-26
|
||||
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'";
|
||||
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
|
||||
|
@ -39672,8 +39672,6 @@ with pkgs;
|
||||
|
||||
wtf = callPackage ../applications/misc/wtf { };
|
||||
|
||||
zk-shell = callPackage ../applications/misc/zk-shell { };
|
||||
|
||||
tora = libsForQt5.callPackage ../development/tools/tora { };
|
||||
|
||||
xrq = callPackage ../applications/misc/xrq { };
|
||||
|
@ -2696,8 +2696,14 @@ self: super: with self; {
|
||||
|
||||
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 { cudaPackages = pkgs.cudaPackages_11; };
|
||||
cupy = callPackage ../development/python-modules/cupy {
|
||||
# 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 { };
|
||||
|
||||
@ -5509,6 +5515,8 @@ self: super: with self; {
|
||||
|
||||
heapdict = callPackage ../development/python-modules/heapdict { };
|
||||
|
||||
heatmiserv3 = callPackage ../development/python-modules/heatmiserv3 { };
|
||||
|
||||
heatshrink2 = callPackage ../development/python-modules/heatshrink2 { };
|
||||
|
||||
heatzypy = callPackage ../development/python-modules/heatzypy { };
|
||||
|
Loading…
Reference in New Issue
Block a user