commit 1690b96ee25a8c6cc939ae3c9529d812230e0de0 Author: Giulio De Pasquale Date: Sat Dec 28 17:56:53 2024 +0000 Init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f7c580 --- /dev/null +++ b/.gitignore @@ -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 + + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6b15622 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ffb9747 --- /dev/null +++ b/flake.nix @@ -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; + }; + } + ); +} + + diff --git a/huenicorn.nix b/huenicorn.nix new file mode 100644 index 0000000..b8e611f --- /dev/null +++ b/huenicorn.nix @@ -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 + ''; +}