Add more packages to the NUR

main
Carsten Kragelund 2023-05-07 01:35:31 +02:00
parent 843da5466e
commit 3fb26afa85
Signed by: nyx
GPG Key ID: CADDADEEC9F753C0
7 changed files with 284 additions and 2 deletions

@ -6,7 +6,7 @@
# commands such as:
# nix-build -A mypackage
{ pkgs ? import <nixpkgs> { } }:
{ pkgs ? import <nixpkgs> { }, system ? builtins.currentSystem, mach-nix, mach-nixpkgs }:
{
# The `lib`, `modules`, and `overlay` names are special
@ -16,4 +16,6 @@
firefox-addons = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs/firefox-addons { });
gitea-nyx = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs/gitea-nyx { });
emacsPackages = import ./pkgs/emacs-packages { inherit pkgs; };
rec-mono-nyx = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs/rec-mono-nyx { inherit mach-nix mach-nixpkgs system; });
}

@ -1,5 +1,59 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"mach-nix": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"mach-nixpkgs"
],
"pypi-deps-db": "pypi-deps-db"
},
"locked": {
"lastModified": 1661359648,
"narHash": "sha256-BRz30Xg/g535oRJA3xEcXf0KM6GTJPugt2lgaom3D6g=",
"owner": "davhau",
"repo": "mach-nix",
"rev": "6cd3929b1561c3eef68f5fc6a08b57cf95c41ec1",
"type": "github"
},
"original": {
"owner": "davhau",
"repo": "mach-nix",
"rev": "6cd3929b1561c3eef68f5fc6a08b57cf95c41ec1",
"type": "github"
}
},
"mach-nixpkgs": {
"locked": {
"lastModified": 1670452817,
"narHash": "sha256-u5GnneIreydXauFCces/boSaj5+0ZgtBIlkOcwGriXY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9fd0585f7dc9b85eb5d426396004cc649261e60d",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9fd0585f7dc9b85eb5d426396004cc649261e60d",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1624561540,
@ -16,8 +70,26 @@
"type": "github"
}
},
"pypi-deps-db": {
"flake": false,
"locked": {
"lastModified": 1670518748,
"narHash": "sha256-pfUce0zlRI+tzxPgvRSKkusjxDCBVjCpkcDKWboHa+U=",
"owner": "davhau",
"repo": "pypi-deps-db",
"rev": "e9571cac25d2f509e44fec9dc94a3703a40126ff",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "pypi-deps-db",
"type": "github"
}
},
"root": {
"inputs": {
"mach-nix": "mach-nix",
"mach-nixpkgs": "mach-nixpkgs",
"nixpkgs": "nixpkgs"
}
}

@ -1,7 +1,16 @@
{
description = "My personal NUR repository";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
inputs.mach-nixpkgs.url = "github:nixos/nixpkgs/9fd0585f7dc9b85eb5d426396004cc649261e60d";
inputs.mach-nix = {
url = "github:davhau/mach-nix/6cd3929b1561c3eef68f5fc6a08b57cf95c41ec1";
inputs.nixpkgs.follows = "mach-nixpkgs";
inputs.pypi-deps-db = {
url = "github:davhau/pypi-deps-db/e9571cac25d2f509e44fec9dc94a3703a40126ff";
inputs.nixpkgs.follows = "mach-nixpkgs";
};
};
outputs = { self, nixpkgs, mach-nixpkgs, mach-nix }:
let
systems = [
"x86_64-linux"
@ -16,6 +25,8 @@
{
packages = forAllSystems (system: import ./default.nix {
pkgs = import nixpkgs { inherit system; };
mach-nixpkgs = import mach-nixpkgs { inherit system; };
inherit mach-nix system;
});
};
}

@ -0,0 +1,3 @@
{ pkgs, ... }: {
spectre-el = pkgs.callPackage spectre-el.nix {};
}

@ -0,0 +1,57 @@
{ lib, stdenv, fetchgit, meson, ninja, pkg-config, callPackage, emacs }:
stdenv.mkDerivation rec {
pname = "spectre-el";
version = "0.3.0";
src = fetchgit {
url = "https://github.com/nyxkrage/spectre-emacs";
rev = "41a9258710ec21fcbb94c80f456da04c9760cf45";
sha256 = "sha256-zd2yR3y0GnCC0CGx8ij+Kag+8TRRxOqhUwQ2T5ncDEI=";
};
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
pkg-config
ninja
emacs
];
buildInputs = [
(callPackage ../libspectre {})
];
configurePhase = ''
meson setup build --libdir $out/share/emacs/site-lisp/elpa/${pname}-${version}
cd build
'';
buildPhase = ''
ninja
'';
installPhase = ''
mkdir -p $out/share/emacs/site-lisp/elpa/${pname}-${version}
ninja install
cd ..
cp spectre.el $out/share/emacs/site-lisp/elpa/${pname}-${version}
'';
outputs = [ "out" ];
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
description = "The Spectre Password Manager for Emacs";
homepage = "https://spectre.app/";
license = licenses.gpl3;
maintainers = with maintainers; [ nyxkrage ];
platforms = platforms.all;
};
}

@ -0,0 +1,40 @@
{ lib, stdenv, fetchgit, libsodium, meson, pkg-config, ninja }:
stdenv.mkDerivation rec {
pname = "libspectre";
version = "1.0.0";
src = fetchgit {
url = "https://github.com/nyxkrage/spectre-lib";
rev = "da65b8ac4502eb7ec0f0ce57c5d6d6bf79b1d3e4";
sha256 = "sha256-iHhUPNl1GkVLRJNAMqvyDpTU1dXUDWnwgFOnRGo7Ikc=";
};
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
pkg-config
ninja
];
buildInputs = [
libsodium
];
outputs = [ "out" "dev" ];
enableParallelBuilding = true;
doCheck = true;
meta = with lib; {
description = "A modern and easy-to-use crypto library";
homepage = "https://spectre.app/";
license = licenses.gpl3;
maintainers = with maintainers; [ nyxkrage ];
platforms = platforms.all;
};
}

@ -0,0 +1,97 @@
{ pkgs
, mach-nixpkgs
, mach-nix
, system ? builtins.currentSystem
, ...
}: pkgs.stdenv.mkDerivation rec {
pname = "rec-mono-nyx";
version = "1.0.0";
src = pkgs.fetchgit {
url = "https://github.com/arrowtype/recursive-code-config.git";
rev = "c20977eb1f3cd59ca7ce03a740b4745f0d299b27";
sha256 = "sha256-OaYhOCpjOZI3cIPUNhppqGAQOrGwuQ09tl1pXCtNj5s=";
};
recConfig = builtins.toJSON {
"Family Name" = "Nyx";
Fonts = {
Regular = {
MONO = 1;
CASL = 1;
wght = 500;
slnt = 0;
CRSV = 0;
};
Italic = {
MONO = 1;
CASL = 1;
wght = 500;
slnt = -12;
CRSV = 0;
};
Bold = {
MONO = 1;
CASL = 1;
wght = 800;
slnt = 0;
CRSV = 0;
};
"Bold Italic" = {
MONO = 1;
CASL = 1;
wght = 800;
slnt = -12;
CRSV = 0;
};
};
"Code Ligatures" = false;
Features = [
"ss01"
"ss02"
"ss03"
"ss04"
"ss05"
"ss06"
"ss08"
"ss10"
"ss11"
"ss12"
];
};
nativeBuildInputs = [
(mach-nix.lib."${system}".mkPython {
requirements = builtins.readFile "${src}/requirements.txt";
_.pyyaml.doInstallCheck = false;
ignoreDataOutdated = true;
python = "python39";
})
mach-nixpkgs.python39Packages.pip
mach-nixpkgs.python39Packages.setuptools
];
outputs = [ "out" ];
phases = [ "unpackPhase" "patchPhase" "buildPhase" "installPhase" ];
buildPhase = ''
echo '${recConfig}' > config.yaml
python3 scripts/instantiate-code-fonts.py
'';
installPhase = ''
mkdir -p $out/share/fonts/truetype/
cp fonts/RecMonoNyx/* $out/share/fonts/truetype/
'';
meta = with pkgs.lib; {
description = "Recusrive Mono - Nyx Style";
homepage = "https://spectre.app/";
license = licenses.gpl3;
maintainers = with maintainers; [ nyxkrage ];
platforms = platforms.all;
};
}