From a4f77231f63e6e77eec2e2d08ca16986a4c61d10 Mon Sep 17 00:00:00 2001 From: CLI Arena Date: Tue, 12 Nov 2024 18:38:43 +0100 Subject: [PATCH] build(nix): updated all dependencies --- .envrc | 8 ++ .gitignore | 2 + flake.lock | 238 +++++++++++++++++++++++++++++++++++- flake.nix | 62 +++++++--- nix/gst-wayland-display.nix | 6 +- nix/wolf.nix | 11 +- 6 files changed, 301 insertions(+), 26 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..776df042 --- /dev/null +++ b/.envrc @@ -0,0 +1,8 @@ +if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" +fi + +watch_file devenv.nix +watch_file devenv.lock +watch_file devenv.yaml +use flake . --impure diff --git a/.gitignore b/.gitignore index 889bb9d7..e2ff0ad0 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ build/ .clj-kondo .lsp result +.devenv +.direnv diff --git a/flake.lock b/flake.lock index 34acd639..d8d533b0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,241 @@ { "nodes": { + "cachix": { + "inputs": { + "devenv": [ + "devenv" + ], + "flake-compat": [ + "devenv" + ], + "git-hooks": [ + "devenv" + ], + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1728672398, + "narHash": "sha256-KxuGSoVUFnQLB2ZcYODW7AVPAh9JqRlD5BrfsC/Q4qs=", + "owner": "cachix", + "repo": "cachix", + "rev": "aac51f698309fd0f381149214b7eee213c66ef0a", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "latest", + "repo": "cachix", + "type": "github" + } + }, + "devenv": { + "inputs": { + "cachix": "cachix", + "flake-compat": "flake-compat", + "git-hooks": "git-hooks", + "nix": "nix", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1731350778, + "narHash": "sha256-ALe/NWJY2GsaWt/nL+KVcTbQP6h/R8YbXyk/MZ0TQG4=", + "owner": "cachix", + "repo": "devenv", + "rev": "320d4ddeb71e1942cc8118299b0767914ad96099", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "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": [ + "devenv", + "nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "devenv" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "nixpkgs-stable": [ + "devenv" + ] + }, + "locked": { + "lastModified": 1730302582, + "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "devenv", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "libgit2": { + "flake": false, + "locked": { + "lastModified": 1697646580, + "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", + "owner": "libgit2", + "repo": "libgit2", + "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", + "type": "github" + }, + "original": { + "owner": "libgit2", + "repo": "libgit2", + "type": "github" + } + }, + "nix": { + "inputs": { + "flake-compat": [ + "devenv" + ], + "flake-parts": "flake-parts", + "libgit2": "libgit2", + "nixpkgs": "nixpkgs_2", + "nixpkgs-23-11": [ + "devenv" + ], + "nixpkgs-regression": [ + "devenv" + ], + "pre-commit-hooks": [ + "devenv" + ] + }, + "locked": { + "lastModified": 1727438425, + "narHash": "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=", + "owner": "domenkozar", + "repo": "nix", + "rev": "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.24", + "repo": "nix", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1717432640, + "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "release-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1716977621, + "narHash": "sha256-Q1UQzYcMJH4RscmpTkjlgqQDX5yi1tZL0O345Ri6vXQ=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1718160348, "narHash": "sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus=", @@ -18,7 +253,8 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "devenv": "devenv", + "nixpkgs": "nixpkgs_4" } } }, diff --git a/flake.nix b/flake.nix index bd332b3e..51bc7717 100644 --- a/flake.nix +++ b/flake.nix @@ -3,11 +3,12 @@ inputs = { # nixpkgs.url = "github:NixOS/nixpkgs/9957cd48326fe8dbd52fdc50dd2502307f188b0d"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + devenv.url = "github:cachix/devenv"; }; - outputs = inputs@{ self,... }: + outputs = inputs@{ self, ... }: let - system = "x86_64-linux"; + system = "x86_64-linux"; pkgs = import inputs.nixpkgs { inherit system; }; deps = { boost-json_src = pkgs.fetchFromGitHub { @@ -17,10 +18,10 @@ hash = "sha256-c/spP97jrs6gfEzsiMpdt8DDP6n1qOQbLduY+1/i424="; }; eventbus_src = pkgs.fetchFromGitHub { - owner = "DeveloperPaul123"; + owner = "games-on-whales"; repo = "eventbus"; - rev = "0.10.1"; - hash = "sha256-q8ymvmgsKvU6i4DAsuzTzo7rsdGkRHqwmiLJ9qXcM/c="; + rev = "abb3a48"; + hash = "sha256-LHBsjvZtxid4KIFQclqs2I155J/9UpDR1NhlSFx4OvU="; }; immer_src = pkgs.fetchFromGitHub { owner = "arximboldi"; @@ -31,14 +32,20 @@ inputtino_src = pkgs.fetchFromGitHub { owner = "games-on-whales"; repo = "inputtino"; - rev = "753a639"; - hash = "sha256-qw0qKNWPjO/VfFqNX3uhSniY+/KMIL8aggwyvQht9z8="; + rev = "5d4b8b2"; + hash = "sha256-piyGsI/BFTYJ9hVG+dw243ZDUiKZWdynJySGA6/IYlk="; + }; + mdns-cpp_src = pkgs.fetchFromGitHub { + owner = "games-on-whales"; + repo = "mdns_cpp"; + rev = "0d57ae3"; + hash = "sha256-mG/Ob5SIqcIyp5r5IpFh8bJOSul1zRzKvrvdfywVwcg="; }; fmtlib_src = pkgs.fetchFromGitHub { owner = "fmtlib"; repo = "fmt"; - rev = "9.1.0"; - hash = "sha256-rP6ymyRc7LnKxUXwPpzhHOQvpJkpnRFOt2ctvUNlYI0="; + rev = "11.0.1"; + hash = "sha256-EPidbZxCvysrL64AzbpJDowiNxqy4ii+qwSWAFwf/Ps="; }; range_src = pkgs.fetchFromGitHub { owner = "ericniebler"; @@ -55,8 +62,8 @@ nanors_src = pkgs.fetchFromGitHub { owner = "sleepybishop"; repo = "nanors"; - rev = "395e5ada44dd8d5974eaf6bb6b17f23406e3ca72"; - hash = "sha256-M/jGBgQ64DTD7YPs+B4eRuArhOnUo8uPwJcviNu+GQk="; + rev = "19f07b513e924e471cadd141943c1ec4adc8d0e0"; + hash = "sha256-lpEDW5JZmFMPdJlS0/2a4MZU68dt7lz633ymbuSUyBc="; }; peglib_src = pkgs.fetchFromGitHub { owner = "yhirose"; @@ -64,11 +71,17 @@ rev = "v1.8.5"; hash = "sha256-GeQQGJtxyoLAXrzplHbf2BORtRoTWrU08TWjjq7YqqE="; }; - toml_src = pkgs.fetchFromGitHub { - owner = "ToruNiina"; - repo = "toml11"; - rev = "v3.7.1"; - hash = "sha256-HnhXBvIjo1JXhp+hUQvjs83t5IBVbNN6o3ZGhB4WESQ="; + # toml_src = pkgs.fetchFromGitHub { + # owner = "ToruNiina"; + # repo = "toml11"; + # rev = "v3.7.1"; + # hash = "sha256-HnhXBvIjo1JXhp+hUQvjs83t5IBVbNN6o3ZGhB4WESQ="; + # }; + tomlplusplus_src = pkgs.fetchFromGitHub { + owner = "marzer"; + repo = "tomlplusplus"; + rev = "v3.4.0"; + hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M="; }; cpptrace_src = pkgs.fetchFromGitHub { owner = "jeremy-rifkin"; @@ -76,11 +89,17 @@ rev = "448c325"; hash = "sha256-JGwRhmsd0xiHkK0JW0AUvWAnJA9UztK2wQ+c5aq2y6E="; }; + reflect-cpp_src = pkgs.fetchFromGitHub { + owner = "getml"; + repo = "reflect-cpp"; + rev = "54c2a84"; + hash = "sha256-JLUH6LDEeWrEiVYXEMrqI5/y0HXFr0HH+iwtVHQ+qqk="; + }; libdwarf_src = pkgs.fetchFromGitHub { owner = "jeremy-rifkin"; repo = "libdwarf-lite"; - rev = "5c0cb25"; - hash = "sha256-so/y6GnhwYZPFCeoKih+sPgndnuHWHE1h9mWXnccXxM="; + rev = "v0.11.0"; + hash = "sha256-S2KDfWqqdQfK5+eQny2X5k0A5u9npkQ8OFRLBmTulao="; }; simplewebserver_src = pkgs.fetchFromGitLab { owner = "eidheim"; @@ -96,5 +115,12 @@ packages.x86_64-linux.default = import ./nix/wolf.nix { inherit pkgs self deps; }; + devShells.x86_64-linux.default = inputs.devenv.lib.mkShell { + inherit inputs pkgs; + modules = [{ + env = { }; + packages = with pkgs; [ nil nixfmt deadnix ]; + }]; + }; }; } diff --git a/nix/gst-wayland-display.nix b/nix/gst-wayland-display.nix index abd41ca2..079f8e9f 100644 --- a/nix/gst-wayland-display.nix +++ b/nix/gst-wayland-display.nix @@ -6,8 +6,8 @@ pkgs.rustPlatform.buildRustPackage rec { src = pkgs.fetchFromGitHub { owner = "games-on-whales"; repo = "gst-wayland-display"; - rev = "aa5626f7b74cc5aeeb2ded188fe62ca27b056998"; - hash = "sha256-QOTZDlcmjzQqDMheCx13NryfO1mP+AI8Lq2xS1IoG0Y="; + rev = "a31f5a02a1c54ee14fca54f1eaea1a1c583ab139"; + hash = "sha256-xofDFqIjSEdzXj3/Qa2G24GZcLArOrwIoBSKqteqBLE="; }; nativeBuildInputs = with pkgs; [ pkg-config cargo-c ]; buildInputs = with pkgs; [ @@ -37,7 +37,7 @@ pkgs.rustPlatform.buildRustPackage rec { lockFile = cargoLockFile; outputHashes = { # "smithay-0.3.0" = pkgs.lib.fakeSha256; - "smithay-0.3.0" = "sha256-jrBY/r4IuVKiE7ykuxeZcJgikqJo6VoKQlBWrDbpy9Y="; + "smithay-0.3.0" = "sha256-d13BZvEWSwKzFVe7X9ysCNQZj6BFPChM4oCfvX7URs8="; }; }; diff --git a/nix/wolf.nix b/nix/wolf.nix index 3a0b0b8f..ce28ef5f 100644 --- a/nix/wolf.nix +++ b/nix/wolf.nix @@ -48,7 +48,7 @@ in pkgs.stdenv.mkDerivation { libunwind orc libdrm - boost175 + boost gst_all_1.gstreamer # Common plugins like "filesrc" to combine within e.g. gst-launch gst_all_1.gst-plugins-base @@ -76,10 +76,13 @@ in pkgs.stdenv.mkDerivation { "-DFETCHCONTENT_SOURCE_DIR_NANORS=${deps.nanors_src}" "-DFETCHCONTENT_SOURCE_DIR_PEGLIB=${deps.peglib_src}" "-DFETCHCONTENT_SOURCE_DIR_SIMPLEWEBSERVER=${deps.simplewebserver_src}" - "-DFETCHCONTENT_SOURCE_DIR_TOML=${deps.toml_src}" + # "-DFETCHCONTENT_SOURCE_DIR_TOML=${deps.toml_src}" "-DFETCHCONTENT_SOURCE_DIR_ENET=${deps.enet_src}" "-DFETCHCONTENT_SOURCE_DIR_CPPTRACE=${deps.cpptrace_src}" "-DFETCHCONTENT_SOURCE_DIR_LIBDWARF=${deps.libdwarf_src}" + "-DFETCHCONTENT_SOURCE_DIR_TOMLPLUSPLUS=${deps.tomlplusplus_src}" + "-DFETCHCONTENT_SOURCE_DIR_REFLECT-CPP=${deps.reflect-cpp_src}" + "-DFETCHCONTENT_SOURCE_DIR_MDNS_CPP=${deps.mdns-cpp_src}" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_CXX_STANDARD=17" "-DCMAKE_CXX_EXTENSIONS=OFF" @@ -105,8 +108,8 @@ in pkgs.stdenv.mkDerivation { --prefix RUST_BACKTRACE : "full" --prefix RUST_LOG : "WARN" --prefix GST_DEBUG : 2 - --prefix PUID : 0 - --prefix PGID : 0 + --prefix PUID : 0 + --prefix PGID : 0 --prefix UNAME : "root" ) '';