From 63ffecaa6e58137074e45fe460be651c6901f848 Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 13:13:36 +0300 Subject: [PATCH 01/10] Added nix files --- flake.lock | 61 ++++++++++++++++++++++++++++++ flake.nix | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000..20db77f52b --- /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": 1776877367, + "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "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 0000000000..1057d70d99 --- /dev/null +++ b/flake.nix @@ -0,0 +1,109 @@ +{ + description = "Noctalia - A lightweight Wayland shell and bar"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + packages.default = pkgs.stdenv.mkDerivation { + pname = "noctalia"; + version = "5.0.0"; + + src = ./.; + + nativeBuildInputs = with pkgs; [ + meson + ninja + pkg-config + wayland-scanner + ]; + + buildInputs = with pkgs; [ + wayland + wayland-protocols + libGL + libglvnd + freetype + fontconfig + cairo + pango + libxkbcommon + sdbus-cpp_2 + systemd + pipewire + pam + curl + libwebp + ]; + + mesonBuildType = "release"; + + dontUseMesonConfigure = true; + + configurePhase = '' + runHook preConfigure + meson setup build --prefix=$out --buildtype=release + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + meson compile -C build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + meson install -C build + runHook postInstall + ''; + + meta = with pkgs.lib; { + description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; + homepage = "https://github.com/anomalyco/noctalia-shell"; + license = licenses.mit; + platforms = platforms.linux; + mainProgram = "noctalia"; + }; + }; + + # Development shell with all dependencies + # Use this for development: nix develop + devShells.default = pkgs.mkShell { + inputsFrom = [ self.packages.${system}.default ]; + + buildInputs = with pkgs; [ + just + clang-tools + gdb + ]; + + shellHook = '' + echo "Noctalia development environment" + echo "" + echo "Available commands:" + echo " just configure - Configure debug build" + echo " just build - Build debug" + echo " just run - Run debug build" + echo " just configure release - Configure release build" + echo " just build release - Build release" + echo " just run release - Run release build" + echo "" + echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" + ''; + }; + + apps.default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/noctalia"; + }; + } + ); +} From dc9f5467695a369b418c493a44aaa787c0e95b9f Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 19:56:44 +0300 Subject: [PATCH 02/10] Fix arch type build cleanup --- flake.lock | 34 --------- flake.nix | 201 +++++++++++++++++++++++++++++------------------------ 2 files changed, 109 insertions(+), 126 deletions(-) diff --git a/flake.lock b/flake.lock index 20db77f52b..6908e2511d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "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": 1776877367, @@ -36,24 +18,8 @@ }, "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", diff --git a/flake.nix b/flake.nix index 1057d70d99..fc6c423ca6 100644 --- a/flake.nix +++ b/flake.nix @@ -3,107 +3,124 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - packages.default = pkgs.stdenv.mkDerivation { - pname = "noctalia"; - version = "5.0.0"; + outputs = { self, nixpkgs }: + let + inherit (nixpkgs) lib; + systems = [ + "x86_64-linux" + ]; + forEachSystem = perSystem: + lib.genAttrs systems ( + system: let + pkgs = nixpkgs.legacyPackages.${system}; + in + perSystem { inherit pkgs system; } + ); + in + { + packages = forEachSystem ( + { pkgs, ... }: { + default = pkgs.stdenv.mkDerivation { + pname = "noctalia"; + version = "5.0.0"; - src = ./.; + src = ./.; - nativeBuildInputs = with pkgs; [ - meson - ninja - pkg-config - wayland-scanner - ]; + nativeBuildInputs = with pkgs; [ + meson + ninja + pkg-config + wayland-scanner + ]; - buildInputs = with pkgs; [ - wayland - wayland-protocols - libGL - libglvnd - freetype - fontconfig - cairo - pango - libxkbcommon - sdbus-cpp_2 - systemd - pipewire - pam - curl - libwebp - ]; + buildInputs = with pkgs; [ + wayland + wayland-protocols + libGL + libglvnd + freetype + fontconfig + cairo + pango + libxkbcommon + sdbus-cpp_2 + systemd + pipewire + pam + curl + libwebp + ]; - mesonBuildType = "release"; - - dontUseMesonConfigure = true; - - configurePhase = '' - runHook preConfigure - meson setup build --prefix=$out --buildtype=release - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - meson compile -C build - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - meson install -C build - runHook postInstall - ''; + mesonBuildType = "release"; + + dontUseMesonConfigure = true; + + configurePhase = '' + runHook preConfigure + meson setup build --prefix=$out --buildtype=release + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + meson compile -C build + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + meson install -C build + runHook postInstall + ''; - meta = with pkgs.lib; { - description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; - homepage = "https://github.com/anomalyco/noctalia-shell"; - license = licenses.mit; - platforms = platforms.linux; - mainProgram = "noctalia"; + meta = with pkgs.lib; { + description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; + homepage = "https://github.com/anomalyco/noctalia-shell"; + license = licenses.mit; + platforms = platforms.linux; + mainProgram = "noctalia"; + }; }; - }; + } + ); - # Development shell with all dependencies - # Use this for development: nix develop - devShells.default = pkgs.mkShell { - inputsFrom = [ self.packages.${system}.default ]; - - buildInputs = with pkgs; [ - just - clang-tools - gdb - ]; + devShells = forEachSystem ( + { pkgs, system }: { + default = pkgs.mkShell { + inputsFrom = [ self.packages.${system}.default ]; + + buildInputs = with pkgs; [ + just + clang-tools + gdb + ]; - shellHook = '' - echo "Noctalia development environment" - echo "" - echo "Available commands:" - echo " just configure - Configure debug build" - echo " just build - Build debug" - echo " just run - Run debug build" - echo " just configure release - Configure release build" - echo " just build release - Build release" - echo " just run release - Run release build" - echo "" - echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" - ''; - }; + shellHook = '' + echo "Noctalia development environment" + echo "" + echo "Available commands:" + echo " just configure - Configure debug build" + echo " just build - Build debug" + echo " just run - Run debug build" + echo " just configure release - Configure release build" + echo " just build release - Build release" + echo " just run release - Run release build" + echo "" + echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" + ''; + }; + } + ); - apps.default = { - type = "app"; - program = "${self.packages.${system}.default}/bin/noctalia"; - }; - } - ); + apps = forEachSystem ( + { system, ... }: { + default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/noctalia"; + }; + } + ); + }; } From ac087e140c585c8e405a5d9fefba0c15aa8e4bee Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 20:10:28 +0300 Subject: [PATCH 03/10] fix: no more warns + fixed progress display --- flake.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index fc6c423ca6..3a06caac29 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,11 @@ src = ./.; + postPatch = '' + sed -i "s/'-march=native', '-mtune=native',//" meson.build + ''; + + nativeBuildInputs = with pkgs; [ meson ninja @@ -65,7 +70,7 @@ buildPhase = '' runHook preBuild - meson compile -C build + meson compile -C build -v runHook postBuild ''; From a13975cf3bcd9d2eabf0302eb0639bd8a7e1b26c Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 21:03:24 +0300 Subject: [PATCH 04/10] Add files via upload --- flake.lock | 6 +++--- flake.nix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 6908e2511d..ff7718ee30 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1776877367, - "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", + "lastModified": 1777268161, + "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", + "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3a06caac29..e590a37b70 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ inherit (nixpkgs) lib; systems = [ "x86_64-linux" + "aarch64-linux" ]; forEachSystem = perSystem: lib.genAttrs systems ( From 04da62b0040ef59f8b8689707a47f9fefbedd5ba Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 21:35:35 +0300 Subject: [PATCH 05/10] added aarch + make it more clear --- flake.nix | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index e590a37b70..b5557a67c7 100644 --- a/flake.nix +++ b/flake.nix @@ -61,25 +61,7 @@ mesonBuildType = "release"; - dontUseMesonConfigure = true; - - configurePhase = '' - runHook preConfigure - meson setup build --prefix=$out --buildtype=release - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - meson compile -C build -v - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - meson install -C build - runHook postInstall - ''; + ninjaFlags = [ "-v" ]; meta = with pkgs.lib; { description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; From b1d8fd04ce516d6c7e179fd7607a244a22ffdbc8 Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Tue, 28 Apr 2026 21:44:50 +0300 Subject: [PATCH 06/10] used lib.getExe instead of the hardcoded path --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index b5557a67c7..ba932d2741 100644 --- a/flake.nix +++ b/flake.nix @@ -103,10 +103,10 @@ ); apps = forEachSystem ( - { system, ... }: { + { pkgs, system }: { default = { type = "app"; - program = "${self.packages.${system}.default}/bin/noctalia"; + program = lib.getExe self.packages.${system}.default; }; } ); From 9ccedab6f84f6e54e2e8be07afcd7bd76060ca2f Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Wed, 29 Apr 2026 13:28:05 +0300 Subject: [PATCH 07/10] refactor: make its based on nix/ --- flake.nix | 77 +++++------------------------------------------- nix/devshell.nix | 25 ++++++++++++++++ nix/package.nix | 71 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 70 deletions(-) create mode 100644 nix/devshell.nix create mode 100644 nix/package.nix diff --git a/flake.nix b/flake.nix index ba932d2741..1dd65b6e2e 100644 --- a/flake.nix +++ b/flake.nix @@ -21,83 +21,20 @@ ); in { + overlays.default = final: prev: { + noctalia = final.callPackage ./nix/package.nix { }; + }; + packages = forEachSystem ( { pkgs, ... }: { - default = pkgs.stdenv.mkDerivation { - pname = "noctalia"; - version = "5.0.0"; - - src = ./.; - - postPatch = '' - sed -i "s/'-march=native', '-mtune=native',//" meson.build - ''; - - - nativeBuildInputs = with pkgs; [ - meson - ninja - pkg-config - wayland-scanner - ]; - - buildInputs = with pkgs; [ - wayland - wayland-protocols - libGL - libglvnd - freetype - fontconfig - cairo - pango - libxkbcommon - sdbus-cpp_2 - systemd - pipewire - pam - curl - libwebp - ]; - - mesonBuildType = "release"; - - ninjaFlags = [ "-v" ]; - - meta = with pkgs.lib; { - description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; - homepage = "https://github.com/anomalyco/noctalia-shell"; - license = licenses.mit; - platforms = platforms.linux; - mainProgram = "noctalia"; - }; - }; + default = pkgs.callPackage ./nix/package.nix { }; } ); devShells = forEachSystem ( { pkgs, system }: { - default = pkgs.mkShell { - inputsFrom = [ self.packages.${system}.default ]; - - buildInputs = with pkgs; [ - just - clang-tools - gdb - ]; - - shellHook = '' - echo "Noctalia development environment" - echo "" - echo "Available commands:" - echo " just configure - Configure debug build" - echo " just build - Build debug" - echo " just run - Run debug build" - echo " just configure release - Configure release build" - echo " just build release - Build release" - echo " just run release - Run release build" - echo "" - echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" - ''; + default = pkgs.callPackage ./nix/devshell.nix { + noctalia = self.packages.${system}.default; }; } ); diff --git a/nix/devshell.nix b/nix/devshell.nix new file mode 100644 index 0000000000..eb72fa1b1f --- /dev/null +++ b/nix/devshell.nix @@ -0,0 +1,25 @@ +{ pkgs, noctalia }: + +pkgs.mkShell { + inputsFrom = [ noctalia ]; + + buildInputs = with pkgs; [ + just + clang-tools + gdb + ]; + + shellHook = '' + echo "Noctalia development environment" + echo "" + echo "Available commands:" + echo " just configure - Configure debug build" + echo " just build - Build debug" + echo " just run - Run debug build" + echo " just configure release - Configure release build" + echo " just build release - Build release" + echo " just run release - Run release build" + echo "" + echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" + ''; +} diff --git a/nix/package.nix b/nix/package.nix new file mode 100644 index 0000000000..f57aef4134 --- /dev/null +++ b/nix/package.nix @@ -0,0 +1,71 @@ +{ lib, + stdenv, + meson, + ninja, + pkg-config, + wayland-scanner, + wayland, + wayland-protocols, + libGL, + libglvnd, + freetype, + fontconfig, + cairo, + pango, + libxkbcommon, + sdbus-cpp_2, + systemd, + pipewire, + pam, + curl, + libwebp +}: + +stdenv.mkDerivation { + pname = "noctalia"; + version = "5.0.0"; + + src = ../.; + + postPatch = '' + # Remove -march=native and -mtune=native for reproducible builds + sed -i "s/'-march=native', '-mtune=native',//" meson.build + ''; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wayland-scanner + ]; + + buildInputs = [ + wayland + wayland-protocols + libGL + libglvnd + freetype + fontconfig + cairo + pango + libxkbcommon + sdbus-cpp_2 + systemd + pipewire + pam + curl + libwebp + ]; + + mesonBuildType = "release"; + + ninjaFlags = [ "-v" ]; + + meta = with lib; { + description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; + homepage = "https://github.com/anomalyco/noctalia-shell"; + license = licenses.mit; + platforms = platforms.linux; + mainProgram = "noctalia"; + }; +} From 2df68f74fdbda0fc218eb6f7be8072863587dfd9 Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Wed, 29 Apr 2026 13:30:06 +0300 Subject: [PATCH 08/10] add Nix gitignore lines --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index cb37196ca9..16ed2f5a3b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,10 @@ noctalia # OS .DS_Store Thumbs.db + +# Nix +.envrc +.direnv/ +result/ +result +result-* \ No newline at end of file From a36816034b714db532f358c847421e35d91eb45c Mon Sep 17 00:00:00 2001 From: Linus Ammon <235536459+linusammon@users.noreply.github.com> Date: Wed, 29 Apr 2026 13:04:19 +0200 Subject: [PATCH 09/10] chore(nix): clean up style(nix): apply nixfmt formatting chore(nix): switch nixpkgs input to channel url chore(nix): fix homepage url chore(nix): use lib.cleanSource for source filtering chore(nix): port devshell from #2584 chore(nix): derive version from lastModifiedDate and shortRev --- flake.lock | 13 +++++------- flake.nix | 38 +++++++++++++++++++++++++---------- nix/devshell.nix | 34 +++++++++++++++++-------------- nix/package.nix | 52 +++++++++++++++++++++++++----------------------- 4 files changed, 79 insertions(+), 58 deletions(-) diff --git a/flake.lock b/flake.lock index ff7718ee30..bc69ffd0fc 100644 --- a/flake.lock +++ b/flake.lock @@ -3,17 +3,14 @@ "nixpkgs": { "locked": { "lastModified": 1777268161, - "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", - "owner": "NixOS", - "repo": "nixpkgs", + "narHash": "sha256-e1tDUQMbFCxCnke314UpghgRqg3FJLtcXFfq/WTRLYI=", "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", - "type": "github" + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre987561.1c3fe55ad329/nixexprs.tar.xz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "root": { diff --git a/flake.nix b/flake.nix index 1dd65b6e2e..716dd16465 100644 --- a/flake.nix +++ b/flake.nix @@ -2,37 +2,54 @@ description = "Noctalia - A lightweight Wayland shell and bar"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; - outputs = { self, nixpkgs }: + outputs = + { self, nixpkgs }: let inherit (nixpkgs) lib; + systems = [ "x86_64-linux" "aarch64-linux" ]; - forEachSystem = perSystem: + + forEachSystem = + perSystem: lib.genAttrs systems ( - system: let + system: + let pkgs = nixpkgs.legacyPackages.${system}; in - perSystem { inherit pkgs system; } + perSystem { inherit pkgs system; } ); + + mkDate = + longDate: + nixpkgs.lib.concatStringsSep "-" [ + (builtins.substring 0 4 longDate) + (builtins.substring 4 2 longDate) + (builtins.substring 6 2 longDate) + ]; + + version = mkDate (self.lastModifiedDate or "19700101") + "" + (self.shortRev or "dirty"); in { overlays.default = final: prev: { - noctalia = final.callPackage ./nix/package.nix { }; + noctalia = final.callPackage ./nix/package.nix { inherit version; }; }; packages = forEachSystem ( - { pkgs, ... }: { - default = pkgs.callPackage ./nix/package.nix { }; + { pkgs, ... }: + { + default = pkgs.callPackage ./nix/package.nix { inherit version; }; } ); devShells = forEachSystem ( - { pkgs, system }: { + { pkgs, system }: + { default = pkgs.callPackage ./nix/devshell.nix { noctalia = self.packages.${system}.default; }; @@ -40,7 +57,8 @@ ); apps = forEachSystem ( - { pkgs, system }: { + { system, ... }: + { default = { type = "app"; program = lib.getExe self.packages.${system}.default; diff --git a/nix/devshell.nix b/nix/devshell.nix index eb72fa1b1f..bcedb23c47 100644 --- a/nix/devshell.nix +++ b/nix/devshell.nix @@ -1,25 +1,29 @@ -{ pkgs, noctalia }: - +{ + pkgs, + noctalia, +}: pkgs.mkShell { inputsFrom = [ noctalia ]; - - buildInputs = with pkgs; [ + + nativeBuildInputs = with pkgs; [ + # Workflow & Hooks just + lefthook + + # Formatting (required by justfile) clang-tools + gnugrep + gnused + findutils + + # Debugging gdb ]; shellHook = '' - echo "Noctalia development environment" - echo "" - echo "Available commands:" - echo " just configure - Configure debug build" - echo " just build - Build debug" - echo " just run - Run debug build" - echo " just configure release - Configure release build" - echo " just build release - Build release" - echo " just run release - Run release build" - echo "" - echo "Note: Use 'just build' instead of 'nix build' due to sdbus-c++ API compatibility" + # Point to local assets so binaries find resources without installation + export NOCTALIA_ASSETS_DIR="$PWD/assets" + + echo " Noctalia dev-shell | 'just --list' to see available tasks" ''; } diff --git a/nix/package.nix b/nix/package.nix index f57aef4134..b84f734f8d 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -1,31 +1,33 @@ -{ lib, - stdenv, - meson, - ninja, - pkg-config, - wayland-scanner, - wayland, - wayland-protocols, - libGL, - libglvnd, - freetype, - fontconfig, - cairo, - pango, - libxkbcommon, - sdbus-cpp_2, - systemd, - pipewire, - pam, - curl, - libwebp +{ + lib, + stdenv, + version, + meson, + ninja, + pkg-config, + wayland-scanner, + wayland, + wayland-protocols, + libGL, + libglvnd, + freetype, + fontconfig, + cairo, + pango, + libxkbcommon, + sdbus-cpp_2, + systemd, + pipewire, + pam, + curl, + libwebp, }: stdenv.mkDerivation { pname = "noctalia"; - version = "5.0.0"; + inherit version; - src = ../.; + src = lib.cleanSource ../.; postPatch = '' # Remove -march=native and -mtune=native for reproducible builds @@ -58,12 +60,12 @@ stdenv.mkDerivation { ]; mesonBuildType = "release"; - + ninjaFlags = [ "-v" ]; meta = with lib; { description = "A lightweight Wayland shell and bar built directly on Wayland + OpenGL ES"; - homepage = "https://github.com/anomalyco/noctalia-shell"; + homepage = "https://github.com/noctalia-dev/noctalia-shell"; license = licenses.mit; platforms = platforms.linux; mainProgram = "noctalia"; From e8a0ae89694d7384c13a29f46405ef63e79e1035 Mon Sep 17 00:00:00 2001 From: Rain Xelelo Date: Wed, 29 Apr 2026 14:52:57 +0300 Subject: [PATCH 10/10] Add glib and polkit dependencies to package.nix --- nix/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/package.nix b/nix/package.nix index b84f734f8d..de8a4597e5 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -21,6 +21,8 @@ pam, curl, libwebp, + glib, + polkit }: stdenv.mkDerivation { @@ -57,6 +59,8 @@ stdenv.mkDerivation { pam curl libwebp + glib + polkit ]; mesonBuildType = "release";