mirror of
https://gitlab.blahai.gay/elissa/haipkgs.git
synced 2025-04-08 08:09:31 +00:00
init v2 && first package (JKPS)
This commit is contained in:
parent
e376a7da17
commit
20290dea1a
6 changed files with 104 additions and 15 deletions
39
flake.lock
generated
39
flake.lock
generated
|
@ -1,5 +1,25 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"hjem": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737619027,
|
||||||
|
"narHash": "sha256-jEzZs9dHdmVP5X9HCC/7jrv08aWFfqZV5cZ+cZWYGA4=",
|
||||||
|
"owner": "feel-co",
|
||||||
|
"repo": "hjem",
|
||||||
|
"rev": "48cfa21987672a31a358b7e4d582fc174556e633",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "feel-co",
|
||||||
|
"repo": "hjem",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737469691,
|
"lastModified": 1737469691,
|
||||||
|
@ -18,7 +38,24 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"hjem": "hjem",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
47
flake.nix
47
flake.nix
|
@ -1,33 +1,52 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
|
||||||
|
hjem = {
|
||||||
|
url = "github:feel-co/hjem";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
systems,
|
||||||
|
hjem,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (nixpkgs) lib;
|
forAllSystems = function:
|
||||||
|
nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
forAllSystems = fn:
|
loadPackages = pkgs: let
|
||||||
lib.genAttrs lib.systems.flakeExposed (
|
packageNames = builtins.attrNames (builtins.readDir ./pkgs);
|
||||||
system:
|
in
|
||||||
fn (
|
nixpkgs.lib.genAttrs packageNames (name: pkgs.callPackage (./pkgs + "/${name}") {});
|
||||||
import nixpkgs {
|
|
||||||
inherit system;
|
loadModules = dir: let
|
||||||
config.allowUnfree = true;
|
moduleNames = builtins.attrNames (builtins.readDir dir);
|
||||||
}
|
in
|
||||||
)
|
nixpkgs.lib.genAttrs moduleNames (name: import (dir + "/${name}"));
|
||||||
);
|
|
||||||
|
loadOverlays = let
|
||||||
|
overlayNames = builtins.attrNames (builtins.readDir ./overlays);
|
||||||
|
in
|
||||||
|
nixpkgs.lib.genAttrs overlayNames (name: import (./overlays + "/${name}"));
|
||||||
in {
|
in {
|
||||||
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
packages = forAllSystems loadPackages;
|
||||||
overlays.default = _: prev: self.packages.${prev.stdenv.hostPlatform.system} or {};
|
|
||||||
|
nixosModules = loadModules ./modules/nixos;
|
||||||
|
hjemModules = loadModules ./modules/hjem;
|
||||||
|
|
||||||
|
overlays = loadOverlays;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = ["https://blahai.cachix.org"];
|
extra-substituters = ["https://blahai.cachix.org" "https://nix-community.cachix.org/"];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"blahai.cachix.org-1:7Pg+JDWpcIogeN3HesRnOb4dl6FSwl/ZHC+QUmb65So="
|
"blahai.cachix.org-1:7Pg+JDWpcIogeN3HesRnOb4dl6FSwl/ZHC+QUmb65So="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
1
modules/hjem/default.nix
Normal file
1
modules/hjem/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
modules/nixos/default.nix
Normal file
1
modules/nixos/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
overlays/default.nix
Normal file
1
overlays/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
30
pkgs/jkps/default.nix
Normal file
30
pkgs/jkps/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
cmake,
|
||||||
|
sfml,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "jkps";
|
||||||
|
version = "0.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "JekiTheMonkey";
|
||||||
|
repo = "JKPS";
|
||||||
|
rev = "6d144f511ab8124d5947cfdada77e5584e002a9b";
|
||||||
|
sha256 = "sha256-NveKqapYq//8COndyUpSP8dHiKfTkiH7Yy6b+zdaxtQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [cmake sfml];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D -m777 ./JKPS "$out/bin/JKPS"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A keys-per-second meter for rhythm games, useful for streaming and making videos";
|
||||||
|
homepage = "https://github.com/JekiTheMonkey/JKPS";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue