nvfetcher

This commit is contained in:
xunuwu 2024-09-09 12:02:12 +02:00
parent 013fc0e2d0
commit 1f35c4fe1c
No known key found for this signature in database
9 changed files with 159 additions and 50 deletions

23
_sources/generated.json Normal file
View file

@ -0,0 +1,23 @@
{
"sobercookie": {
"cargoLocks": null,
"date": "2024-09-08",
"extract": null,
"name": "sobercookie",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "xunuwu",
"repo": "sobercookie",
"rev": "0e082ab538a2eed206ab228ed50c5251323abdf2",
"sha256": "sha256-hdW/MqzphyAy6bcN3LDFFRV0t9ZHOx2b96hu9acZ7+E=",
"sparseCheckout": [],
"type": "github"
},
"version": "0e082ab538a2eed206ab228ed50c5251323abdf2"
}
}

16
_sources/generated.nix Normal file
View file

@ -0,0 +1,16 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
sobercookie = {
pname = "sobercookie";
version = "0e082ab538a2eed206ab228ed50c5251323abdf2";
src = fetchFromGitHub {
owner = "xunuwu";
repo = "sobercookie";
rev = "0e082ab538a2eed206ab228ed50c5251323abdf2";
fetchSubmodules = false;
sha256 = "sha256-hdW/MqzphyAy6bcN3LDFFRV0t9ZHOx2b96hu9acZ7+E=";
};
date = "2024-09-08";
};
}

78
flake.lock generated
View file

@ -64,6 +64,22 @@
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -164,9 +180,27 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_5",
"gitignore": "gitignore",
"nixpkgs": [
"small-nvim",
@ -276,7 +310,7 @@
},
"neovim-nightly-overlay": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"hercules-ci-effects": "hercules-ci-effects",
@ -426,6 +460,28 @@
"type": "github"
}
},
"nvfetcher": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1718252448,
"narHash": "sha256-xZZBdKqe1ByITzvx65pVgGQ5jeb73MybjgrcfI84lEo=",
"owner": "berberman",
"repo": "nvfetcher",
"rev": "fa7609950023462c6f91c425de7610c0bb6b86ba",
"type": "github"
},
"original": {
"owner": "berberman",
"repo": "nvfetcher",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
@ -436,6 +492,7 @@
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"nvfetcher": "nvfetcher",
"small-nvim": "small-nvim",
"sops-nix": "sops-nix"
}
@ -530,9 +587,24 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,

View file

@ -23,6 +23,7 @@
home-manager
sops
colmena
inputs.nvfetcher.packages.${pkgs.system}.default
];
name = "dots";
};
@ -47,21 +48,18 @@
nix-index-database.url = "github:Mic92/nix-index-database";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
nvfetcher.url = "github:berberman/nvfetcher";
## deduplication
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
small-nvim.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs = {
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
nvfetcher.inputs.nixpkgs.follows = "nixpkgs";
};
}

View file

@ -17,6 +17,7 @@
in {
flake.colmena = {
meta = {
# machinesFile = TODO
nixpkgs = import inputs.nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;

3
nvfetcher.toml Normal file
View file

@ -0,0 +1,3 @@
[sobercookie]
src.git = "https://github.com/xunuwu/sobercookie"
fetch.github = "xunuwu/sobercookie"

View file

@ -1,8 +1,10 @@
{pkgs, ...}: {
{pkgs, ...}: let
nv_generated = pkgs.callPackage ../_sources/generated.nix {};
in {
jdnbtexplorer = pkgs.qt6Packages.callPackage ./jdnbtexplorer {};
gamesand = pkgs.callPackage ./gamesand {};
pince = pkgs.callPackage ./pince {};
binaryninja-personal = pkgs.qt6Packages.callPackage ./binaryninja-personal {};
sobercookie = pkgs.callPackage ./sobercookie {};
sobercookie = pkgs.callPackage ./sobercookie {inherit nv_generated;};
krunker = pkgs.callPackage ./krunker {};
}

View file

@ -3,6 +3,7 @@
fetchurl,
imagemagick,
}: let
# TODO: use https://github.com/KraXen72/crankshaft, can be tracked with nvfetcher
pname = "krunker";
version = "0.0.1";
src = fetchurl {

View file

@ -1,7 +1,6 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
bash,
makeWrapper,
@ -10,51 +9,45 @@
gtk3,
wrapGAppsHook,
luajit,
nv_generated,
}:
stdenv.mkDerivation rec {
pname = "sobercookie";
src = fetchFromGitHub {
owner = "xunuwu";
repo = "sobercookie";
rev = "0e082ab538a2eed206ab228ed50c5251323abdf2";
sha256 = "sha256-hdW/MqzphyAy6bcN3LDFFRV0t9ZHOx2b96hu9acZ7+E=";
};
version = "0.0.1";
stdenv.mkDerivation (nv_generated.sobercookie
// (let
lgi = luajitPackages.lgi;
in {
buildInputs = [bash luajit];
buildInputs = [bash luajit];
nativeBuildInputs = [
makeWrapper
pkg-config
wrapGAppsHook
gobject-introspection
];
nativeBuildInputs = [
makeWrapper
pkg-config
wrapGAppsHook
gobject-introspection
];
propagatedBuildInputs = [gtk3];
propagatedBuildInputs = [gtk3];
lgi = luajitPackages.lgi;
installPhase = ''
runHook preInstall
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp sobercookie $out/bin/sobercookie
cp launcher.lua $out/bin/sobercookie-launcher
mkdir -p $out/bin
cp sobercookie $out/bin/sobercookie
cp launcher.lua $out/bin/sobercookie-launcher
mkdir -p $out/share/applications
cp sobercookie-launcher.desktop $out/share/applications
mkdir -p $out/share/applications
cp sobercookie-launcher.desktop $out/share/applications
runHook postInstall
'';
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix LUA_PATH : "./?.lua;${lgi}/share/lua/5.1/?.lua;${lgi}/share/lua/5.1/?/init.lua;${luajit}/share/lua/5.1/\?.lua;${luajit}/share/lua/5.1/?/init.lua"
--prefix LUA_CPATH : "./?.so;${lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
)
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix LUA_PATH : "./?.lua;${lgi}/share/lua/5.1/?.lua;${lgi}/share/lua/5.1/?/init.lua;${luajit}/share/lua/5.1/\?.lua;${luajit}/share/lua/5.1/?/init.lua"
--prefix LUA_CPATH : "./?.so;${lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
)
'';
postFixup = ''
wrapProgram $out/bin/sobercookie \
--prefix PATH : ${lib.makeBinPath [bash]}
'';
}
postFixup = ''
wrapProgram $out/bin/sobercookie \
--prefix PATH : ${lib.makeBinPath [bash]}
'';
}))