Update overlay directory paths
This commit is contained in:
parent
c71fbe499b
commit
2a6d53d14a
4 changed files with 89 additions and 56 deletions
|
@ -105,7 +105,7 @@
|
||||||
in
|
in
|
||||||
lib.packagesFromDirectoryRecursive {
|
lib.packagesFromDirectoryRecursive {
|
||||||
callPackage = lib.callPackageWith pkgs;
|
callPackage = lib.callPackageWith pkgs;
|
||||||
directory = ./pkgs/common;
|
directory = pkgs/common;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
31
pkgs/common/fleet/package.nix
Normal file
31
pkgs/common/fleet/package.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
# TODO: not really working, might just remove
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "fleet";
|
||||||
|
version = "1.46.97";
|
||||||
|
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://download-cdn.jetbrains.com/fleet/installers/linux_x64/Fleet-${version}.tar.gz";
|
||||||
|
sha256 = "a7b66f9faff74f2b8b0143bc588a990304dd8efd3ea20fd8d2754cb064a993f3";
|
||||||
|
};
|
||||||
|
|
||||||
|
appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; };
|
||||||
|
in
|
||||||
|
pkgs.appimageTools.wrapType2 rec {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
extraInstallCommands = ''
|
||||||
|
mv $out/bin/${pname} $out/bin/${pname}
|
||||||
|
install -m 444 -D ${appimageContents}/lib/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||||
|
'';
|
||||||
|
# install -m 444 -D ${appimageContents}/ubports-installer.desktop $out/share/applications/${pname}.desktop
|
||||||
|
# substituteInPlace $out/share/applications/${pname}.desktop \
|
||||||
|
# --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Jetbrains Fleet";
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,55 +0,0 @@
|
||||||
{
|
|
||||||
stdenv,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
snapraid-runner-py = pkgs.writeTextFile {
|
|
||||||
name = "snapraid-runner.py";
|
|
||||||
executable = true;
|
|
||||||
destination = "/bin/snapraid-runner.py";
|
|
||||||
text = builtins.readFile ./snapraid-runner.py;
|
|
||||||
};
|
|
||||||
|
|
||||||
snapraid-runner = pkgs.writeTextFile {
|
|
||||||
name = "snapraid-runner.sh";
|
|
||||||
executable = true;
|
|
||||||
destination = "/bin/snapraid-runner";
|
|
||||||
text = ''#!${pkgs.stdenv.shell}
|
|
||||||
|
|
||||||
# Check if the "-c" option is present
|
|
||||||
config_option_present=false
|
|
||||||
for arg in "$@"; do
|
|
||||||
if [ "$arg" = "-c" ]; then
|
|
||||||
config_option_present=true
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Add the default config option if not present
|
|
||||||
if [ "$config_option_present" = false ]; then
|
|
||||||
set -- "-c" "/etc/snapraid-runner.conf" "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
${pkgs.python311}/bin/python3 ${snapraid-runner-py}/bin/snapraid-runner.py "$@"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "snapraid-runner";
|
|
||||||
version = "8f78f9f1af8ca5a9b6469a6c142cab2577157331";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
snapraid-runner
|
|
||||||
];
|
|
||||||
|
|
||||||
builder = pkgs.writeTextFile {
|
|
||||||
name = "builder.sh";
|
|
||||||
text = ''. $stdenv/setup
|
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -sf ${snapraid-runner}/bin/snapraid-runner $out/bin/snapraid-runner'';
|
|
||||||
};
|
|
||||||
}
|
|
57
pkgs/common/snapraid-runner/package.nix
Normal file
57
pkgs/common/snapraid-runner/package.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
snapraid-runner-py = pkgs.writeTextFile {
|
||||||
|
name = "snapraid-runner.py";
|
||||||
|
executable = true;
|
||||||
|
destination = "/bin/snapraid-runner.py";
|
||||||
|
text = builtins.readFile ./snapraid-runner.py;
|
||||||
|
};
|
||||||
|
|
||||||
|
snapraid-runner = pkgs.writeTextFile {
|
||||||
|
name = "snapraid-runner.sh";
|
||||||
|
executable = true;
|
||||||
|
destination = "/bin/snapraid-runner";
|
||||||
|
text = ''
|
||||||
|
#!${pkgs.stdenv.shell}
|
||||||
|
|
||||||
|
# Check if the "-c" option is present
|
||||||
|
config_option_present=false
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ "$arg" = "-c" ]; then
|
||||||
|
config_option_present=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add the default config option if not present
|
||||||
|
if [ "$config_option_present" = false ]; then
|
||||||
|
set -- "-c" "/etc/snapraid-runner.conf" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
${pkgs.python311}/bin/python3 ${snapraid-runner-py}/bin/snapraid-runner.py "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "snapraid-runner";
|
||||||
|
version = "8f78f9f1af8ca5a9b6469a6c142cab2577157331";
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
snapraid-runner
|
||||||
|
];
|
||||||
|
|
||||||
|
builder = pkgs.writeTextFile {
|
||||||
|
name = "builder.sh";
|
||||||
|
text = ''
|
||||||
|
. $stdenv/setup
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -sf ${snapraid-runner}/bin/snapraid-runner $out/bin/snapraid-runner'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue