Migrate packages
This commit is contained in:
parent
642398da4b
commit
d0942d018b
@ -1,37 +0,0 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs, stdenv, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "edit-config";
|
||||
|
||||
runtimeInputs = with pkgs; [ fd fzf ];
|
||||
|
||||
text = ''
|
||||
if [[ $# == 0 ]]; then
|
||||
QUERY=""
|
||||
else
|
||||
QUERY="$1"
|
||||
fi
|
||||
|
||||
FILE=$(fd -H -t f . ~/.dotfiles | fzf --query "$QUERY")
|
||||
if [[ "$FILE" != "" ]]; then
|
||||
$EDITOR "$FILE"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -rp 'Run "home-manager switch"? [Yn]: ' yn
|
||||
case $yn in
|
||||
Y | y | Yes | yes | "" ) home-manager switch;;
|
||||
* ) echo "Not switching home-manager configuration";;
|
||||
esac
|
||||
'';
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "open-messaging";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
nheko
|
||||
telegram-desktop
|
||||
thunderbird
|
||||
];
|
||||
|
||||
text = ''
|
||||
thunderbird &
|
||||
sleep 0.1
|
||||
nheko &
|
||||
sleep 0.1
|
||||
telegram-desktop &
|
||||
'';
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
unzip,
|
||||
...
|
||||
}:
|
||||
let
|
||||
data = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "path-of-building-data";
|
||||
version = "dev-version";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PathOfBuildingCommunity";
|
||||
repo = "PathOfBuilding";
|
||||
rev = "80dfb6f56bb41cad19f9904b3baacc15b8ecf0f7";
|
||||
hash = "sha256-apZYU0PrB3wehzJPNNH3aFKLMA/fK5vo+dtgbho6EiM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
buildCommand = ''
|
||||
# I have absolutely no idea how this file is generated
|
||||
# and I don't think I want to know. The Flatpak also does this.
|
||||
unzip -j -d $out $src/runtime-win32.zip lua/sha1.lua
|
||||
|
||||
# Install the actual data
|
||||
cp -r $src/src $src/runtime/lua/*.lua $src/manifest.xml $out
|
||||
|
||||
# Pretend this is an official build so we don't get the ugly "dev mode" warning
|
||||
substituteInPlace $out/manifest.xml --replace '<Version' '<Version platform="nixos"'
|
||||
touch $out/installed.cfg
|
||||
|
||||
# Completely stub out the update check
|
||||
chmod +w $out/src/UpdateCheck.lua
|
||||
echo 'return "none"' > $out/src/UpdateCheck.lua
|
||||
'';
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "path-of-building";
|
||||
version = "${data.version}-unstable-2023-04-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ernstp";
|
||||
repo = "pobfrontend";
|
||||
rev = "9faa19aa362f975737169824c1578d5011487c18";
|
||||
hash = "sha256-zhw2PZ6ZNMgZ2hG+a6AcYBkeg7kbBHNc2eSt4if17Wk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
kdePackages.qttools
|
||||
kdePackages.wrapQtAppsHook
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
kdePackages.qtbase
|
||||
luajit
|
||||
luajit.pkgs.lua-curl
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm555 pobfrontend $out/bin/pobfrontend
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
qtWrapperArgs+=(
|
||||
--set LUA_PATH "$LUA_PATH"
|
||||
--set LUA_CPATH "$LUA_CPATH"
|
||||
--chdir "${data}"
|
||||
)
|
||||
'';
|
||||
|
||||
passthru.data = data;
|
||||
|
||||
meta = {
|
||||
description = "Offline build planner for Path of Exile";
|
||||
homepage = "https://pathofbuilding.community/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.k900 ];
|
||||
mainProgram = "pobfrontend";
|
||||
broken = stdenv.isDarwin; # doesn't find uic6 for some reason
|
||||
};
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "xwacomcalibrate";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
xf86_input_wacom
|
||||
xorg.xwininfo
|
||||
xorg.xrandr
|
||||
xdotool
|
||||
bc
|
||||
];
|
||||
|
||||
text = ./xwacomcalibrate.sh;
|
||||
}
|
@ -1,21 +1,13 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
conda,
|
||||
yq,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "conda-direnv";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
runtimeInputs = [
|
||||
conda
|
||||
yq
|
||||
];
|
||||
@ -26,7 +18,7 @@ pkgs.writeShellApplication {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ENV_NAME=$(${pkgs.yq}/bin/yq ".name" environment.yml -r)
|
||||
ENV_NAME=$(${yq}/bin/yq ".name" environment.yml -r)
|
||||
if [ "$ENV_NAME" == "" ] || [ "$ENV_NAME" == "null" ]; then
|
||||
echo "Property \"name\" not in environment.yml or empty! Exiting..."
|
||||
exit 1
|
||||
@ -39,7 +31,7 @@ pkgs.writeShellApplication {
|
||||
conda activate $ENV_NAME
|
||||
}
|
||||
|
||||
exec ${pkgs.conda}/bin/conda-shell
|
||||
exec ${conda}/bin/conda-shell
|
||||
conda activate $ENV_NAME || condanew
|
||||
|
||||
echo "Environment active! To update it, run:"
|
16
pkgs/default.nix
Normal file
16
pkgs/default.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
...
|
||||
}:
|
||||
{
|
||||
conda-direnv = pkgs.callPackage ./conda-direnv { };
|
||||
deploy-to-pianopi = pkgs.callPackage ./deploy-to-pianopi { };
|
||||
edit-config = pkgs.callPackage ./edit-config { };
|
||||
hyprshot-gui = pkgs.callPackage ./hyprshot-gui { };
|
||||
install = pkgs.callPackage ./install { };
|
||||
lntocp = pkgs.callPackage ./lntocp { };
|
||||
open-messaging = pkgs.callPackage ./open-messaging { };
|
||||
pulseaudio-popup = pkgs.callPackage ./pulseaudio-popup { };
|
||||
sos = pkgs.callPackage ./sos { };
|
||||
xwacomcalibrate = pkgs.callPackage ./xwacomcalibrate { };
|
||||
}
|
@ -1,18 +1,12 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
rsync,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs, stdenv, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "deploy-to-pianopi";
|
||||
|
||||
runtimeInputs = with pkgs; [ rsync ];
|
||||
runtimeInputs = [ rsync ];
|
||||
|
||||
text = ''
|
||||
set -e
|
34
pkgs/edit-config/default.nix
Normal file
34
pkgs/edit-config/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
fd,
|
||||
fzf,
|
||||
}:
|
||||
writeShellApplication {
|
||||
name = "edit-config";
|
||||
|
||||
runtimeInputs = [
|
||||
fd
|
||||
fzf
|
||||
];
|
||||
|
||||
text = ''
|
||||
if [[ $# == 0 ]]; then
|
||||
QUERY=""
|
||||
else
|
||||
QUERY="$1"
|
||||
fi
|
||||
|
||||
FILE=$(fd -H -t f . ~/.dotfiles | fzf --query "$QUERY")
|
||||
if [[ "$FILE" != "" ]]; then
|
||||
$EDITOR "$FILE"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -rp 'Run "home-manager switch"? [Yn]: ' yn
|
||||
case $yn in
|
||||
Y | y | Yes | yes | "" ) home-manager switch;;
|
||||
* ) echo "Not switching home-manager configuration";;
|
||||
esac
|
||||
'';
|
||||
}
|
@ -2,8 +2,10 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
...
|
||||
makeWrapper,
|
||||
bash,
|
||||
hyprshot,
|
||||
zenity,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -17,9 +19,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-XUy6+mFbNL+3zDfS4tWva4DiJeLnRM9S8ECRayTcPfI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [ makeWrapper ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
buildInputs = [
|
||||
bash
|
||||
hyprshot
|
||||
zenity
|
@ -1,21 +1,11 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "lntocp";
|
||||
|
||||
runtimeInputs = with pkgs; [ ];
|
||||
runtimeInputs = [ ];
|
||||
|
||||
text = ''
|
||||
#!/bin/bash
|
24
pkgs/open-messaging/default.nix
Normal file
24
pkgs/open-messaging/default.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
nheko,
|
||||
telegram-desktop,
|
||||
thunderbird,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "open-messaging";
|
||||
|
||||
runtimeInputs = [
|
||||
nheko
|
||||
telegram-desktop
|
||||
thunderbird
|
||||
];
|
||||
|
||||
text = ''
|
||||
thunderbird &
|
||||
sleep 0.1
|
||||
nheko &
|
||||
sleep 0.1
|
||||
telegram-desktop &
|
||||
'';
|
||||
}
|
@ -1,21 +1,14 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
writeShellApplication,
|
||||
pavucontrol,
|
||||
jgmenu,
|
||||
pulseaudio,
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "pulseaudio-popup";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
runtimeInputs = [
|
||||
pavucontrol
|
||||
jgmenu
|
||||
pulseaudio
|
@ -1,21 +1,13 @@
|
||||
{
|
||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
||||
# as well as the libraries available from your flake's inputs.
|
||||
lib,
|
||||
# You also have access to your flake's inputs.
|
||||
inputs,
|
||||
|
||||
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
|
||||
# programmatically or you may add the named attributes as arguments here.
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
writeShellApplication,
|
||||
nix-output-monitor,
|
||||
jq,
|
||||
}:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "sos";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
runtimeInputs = [
|
||||
nix-output-monitor
|
||||
jq
|
||||
];
|
21
pkgs/xwacomcalibrate/default.nix
Normal file
21
pkgs/xwacomcalibrate/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
xf86_input_wacom,
|
||||
xorg,
|
||||
xdotool,
|
||||
bc,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "xwacomcalibrate";
|
||||
|
||||
runtimeInputs = [
|
||||
xf86_input_wacom
|
||||
xorg.xwininfo
|
||||
xorg.xrandr
|
||||
xdotool
|
||||
bc
|
||||
];
|
||||
|
||||
text = ./xwacomcalibrate.sh;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user