This commit is contained in:
Giulio De Pasquale 2024-12-28 17:56:53 +00:00
commit 1690b96ee2
4 changed files with 184 additions and 0 deletions

40
.gitignore vendored Normal file
View File

@ -0,0 +1,40 @@
*~
,*
.*.swp
.*.swo
.\#*
\#*\#
.idea/
.nixos-test-history
.vscode/
.helix/
outputs/
result-*
result
repl-result-*
tags
!pkgs/development/python-modules/result
/doc/NEWS.html
/doc/NEWS.txt
/doc/manual.html
/doc/manual.pdf
/source/
.version-suffix
.direnv
.envrc
.DS_Store
.mypy_cache
__pycache__
/pkgs/development/libraries/qt-5/*/tmp/
/pkgs/desktops/kde-5/*/tmp/
/pkgs/development/mobile/androidenv/xml/*
# generated by pkgs/common-updater/update-script.nix
update-git-commits.txt
# JetBrains IDEA module declaration file
/nixpkgs.iml

61
flake.lock generated Normal file
View File

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1735264675,
"narHash": "sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G+yO4Ak=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d49da4c08359e3c39c4e27c74ac7ac9b70085966",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

23
flake.nix Normal file
View File

@ -0,0 +1,23 @@
{
description = "My project using flake-utils";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
huenicorn = pkgs.callPackage ./huenicorn.nix { };
default = self.packages.${system}.huenicorn;
};
}
);
}

60
huenicorn.nix Normal file
View File

@ -0,0 +1,60 @@
{ fetchFromGitLab
, stdenv
, cmake
, pkg-config
, opencv
, curl
, crow
, nlohmann_json
, mbedtls
, glib
, libsysprof-capture
, pcre2
, xorgserver
, libX11
, glm
, util-linux
, libselinux
, libsepol
, pipewire
, libXrandr
}:
stdenv.mkDerivation rec {
pname = "huenicorn";
version = "1.0.9";
src = fetchFromGitLab {
owner = "openjowelsofts";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+IcIvudvFRu9VEiF0DAZX2ZtaIgz4ZCMgBPsAphdfrw=";
};
nativeBuildInputs = [
cmake
pkg-config
opencv
curl
crow
nlohmann_json
mbedtls
glib
libsysprof-capture
pcre2
xorgserver
libX11
glm
util-linux
libselinux
libsepol
pipewire
libXrandr
];
installPhase = ''
mkdir -p $out/bin
cp huenicorn $out/bin/
cp -r webroot/ $out/bin
'';
}