mirror of
https://github.com/nmasur/dotfiles
synced 2026-05-17 16:16:26 +00:00
fix nodePackages references in prometheus-actual-exporter
This commit is contained in:
@@ -2,7 +2,12 @@
|
|||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"WebFetch(domain:github.com)",
|
"WebFetch(domain:github.com)",
|
||||||
"WebFetch(domain:raw.githubusercontent.com)"
|
"WebFetch(domain:raw.githubusercontent.com)",
|
||||||
|
"Bash(gh run *)",
|
||||||
|
"Bash(jj status *)",
|
||||||
|
"Bash(jj new *)",
|
||||||
|
"Bash(jj describe *)",
|
||||||
|
"Bash(nix flake *)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ let
|
|||||||
# [ package1.drv package2.drv ]
|
# [ package1.drv package2.drv ]
|
||||||
(builtins.map (name: prev.callPackage name { }))
|
(builtins.map (name: prev.callPackage name { }))
|
||||||
|
|
||||||
|
# Filter out packages that return null (e.g. platform-specific packages)
|
||||||
|
(builtins.filter (v: v != null))
|
||||||
|
|
||||||
# Convert the list to an attrset
|
# Convert the list to an attrset
|
||||||
# { package1 = package1.drv, package2 = package2.drv }
|
# { package1 = package1.drv, package2 = package2.drv }
|
||||||
listToAttrsByPnameOrName
|
listToAttrsByPnameOrName
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
# Fix: Volnoti error: 'volnoti' has been removed due to lack of maintenance upstream.
|
# Fix: Volnoti error: 'volnoti' has been removed due to lack of maintenance upstream.
|
||||||
|
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
if !pkgs.stdenv.isLinux then
|
||||||
|
null
|
||||||
|
else
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
pname = "volnoti";
|
pname = "volnoti";
|
||||||
version = "2013-09-23";
|
version = "2013-09-23";
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
nodejs_20,
|
nodejs_20,
|
||||||
buildNpmPackage,
|
buildNpmPackage,
|
||||||
nodePackages,
|
typescript,
|
||||||
|
node-gyp,
|
||||||
python3,
|
python3,
|
||||||
gcc,
|
gcc,
|
||||||
gnumake,
|
gnumake,
|
||||||
@@ -30,9 +31,9 @@ buildNpmPackage (finalAttrs: rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
nodejs_20
|
nodejs_20
|
||||||
nodePackages.typescript
|
typescript
|
||||||
python3
|
python3
|
||||||
nodePackages.node-gyp
|
node-gyp
|
||||||
gcc
|
gcc
|
||||||
gnumake
|
gnumake
|
||||||
];
|
];
|
||||||
@@ -53,8 +54,8 @@ buildNpmPackage (finalAttrs: rec {
|
|||||||
# export npm_config_build_from_source=true
|
# export npm_config_build_from_source=true
|
||||||
# export npm_config_unsafe_perm=true
|
# export npm_config_unsafe_perm=true
|
||||||
# export BINARY_SITE=none
|
# export BINARY_SITE=none
|
||||||
# export PATH=${nodePackages.node-gyp}/bin:$PATH
|
# export PATH=${node-gyp}/bin:$PATH
|
||||||
# export npm_config_node_gyp=${nodePackages.node-gyp}/bin/node-gyp
|
# export npm_config_node_gyp=${node-gyp}/bin/node-gyp
|
||||||
|
|
||||||
# npm rebuild better-sqlite3 --build-from-source --verbose
|
# npm rebuild better-sqlite3 --build-from-source --verbose
|
||||||
|
|
||||||
@@ -74,8 +75,8 @@ buildNpmPackage (finalAttrs: rec {
|
|||||||
export npm_config_build_from_source=true
|
export npm_config_build_from_source=true
|
||||||
export npm_config_unsafe_perm=true
|
export npm_config_unsafe_perm=true
|
||||||
export BINARY_SITE=none
|
export BINARY_SITE=none
|
||||||
export PATH=${nodePackages.node-gyp}/bin:$PATH
|
export PATH=${node-gyp}/bin:$PATH
|
||||||
export npm_config_node_gyp=${nodePackages.node-gyp}/bin/node-gyp
|
export npm_config_node_gyp=${node-gyp}/bin/node-gyp
|
||||||
|
|
||||||
sed -i '/"install"/d' node_modules/better-sqlite3/package.json
|
sed -i '/"install"/d' node_modules/better-sqlite3/package.json
|
||||||
rm -f node_modules/better-sqlite3/build/Release/better_sqlite3.node || true
|
rm -f node_modules/better-sqlite3/build/Release/better_sqlite3.node || true
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
buildDotnetModule,
|
buildDotnetModule,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
dotnetCorePackages,
|
dotnetCorePackages,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildDotnetModule rec {
|
if !stdenv.isLinux then
|
||||||
|
null
|
||||||
|
else
|
||||||
|
buildDotnetModule rec {
|
||||||
pname = "slsk-batchdl";
|
pname = "slsk-batchdl";
|
||||||
version = "2.4.7";
|
version = "2.4.7";
|
||||||
|
|
||||||
@@ -22,7 +26,6 @@ buildDotnetModule rec {
|
|||||||
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
||||||
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
||||||
|
|
||||||
# Patch the project file to use .NET 8
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace slsk-batchdl/slsk-batchdl.csproj \
|
substituteInPlace slsk-batchdl/slsk-batchdl.csproj \
|
||||||
--replace-fail "net6.0" "net8.0"
|
--replace-fail "net6.0" "net8.0"
|
||||||
@@ -36,4 +39,4 @@ buildDotnetModule rec {
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
mainProgram = "slsk-batchdl";
|
mainProgram = "slsk-batchdl";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
||||||
# This script will partition and format drives; use at your own risk!
|
# This script will partition and format drives; use at your own risk!
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "installer" ''
|
if !pkgs.stdenv.isLinux then
|
||||||
|
null
|
||||||
|
else
|
||||||
|
pkgs.writeShellScriptBin "installer" ''
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
DISK=$1
|
DISK=$1
|
||||||
@@ -41,4 +44,4 @@ pkgs.writeShellScriptBin "installer" ''
|
|||||||
mount /dev/disk/by-label/boot /mnt/boot
|
mount /dev/disk/by-label/boot /mnt/boot
|
||||||
|
|
||||||
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
||||||
''
|
''
|
||||||
|
|||||||
Reference in New Issue
Block a user