From 60e0dfc945616d739c1acdf93f9e2c55dc505638 Mon Sep 17 00:00:00 2001 From: Aylur Date: Sun, 24 Nov 2024 00:38:14 +0000 Subject: add: nix support --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index d7c5229..ac1c5e6 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ notifd = mkPkg "astal-notifd" ./lib/notifd [json-glib gdk-pixbuf]; powerprofiles = mkPkg "astal-power-profiles" ./lib/powerprofiles [json-glib]; river = mkPkg "astal-river" ./lib/river [json-glib]; - tray = mkPkg "astal-tray" ./lib/tray [gtk3 gdk-pixbuf libdbusmenu-gtk3 json-glib]; + tray = mkPkg "astal-tray" ./lib/tray [json-glib (pkgs.callPackage ./nix/appmenu-glib.nix {})]; wireplumber = mkPkg "astal-wireplumber" ./lib/wireplumber [wireplumber]; gjs = pkgs.stdenvNoCC.mkDerivation { -- cgit v1.2.3 From 23083cdec69853bc8e480807a5f93b03df340183 Mon Sep 17 00:00:00 2001 From: cold-leopard Date: Thu, 19 Dec 2024 16:56:58 -0600 Subject: Add aarch64 Compatability to Flake (#183) --- flake.nix | 69 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 33 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index ac1c5e6..052a6f5 100644 --- a/flake.nix +++ b/flake.nix @@ -5,45 +5,48 @@ }: let inherit (builtins) replaceStrings readFile; readVer = file: replaceStrings ["\n"] [""] (readFile file); - - system = "x86_64-linux"; # TODO: other architectures - pkgs = nixpkgs.legacyPackages.${system}; - - mkPkg = name: src: inputs: - pkgs.stdenv.mkDerivation { - nativeBuildInputs = with pkgs; [ - wrapGAppsHook - gobject-introspection - meson - pkg-config - ninja - vala - wayland - wayland-scanner - python3 - ]; - propagatedBuildInputs = [pkgs.glib] ++ inputs; - pname = name; - version = readVer "${src}/version"; - src = src; - postUnpack = '' - cp --remove-destination ${./lib/gir.py} $sourceRoot/gir.py - ''; - outputs = ["out" "dev"]; - }; - in { - devShells.${system} = import ./nix/devshell.nix { - inherit self pkgs; + supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; + forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: (forSystem system f)); + forSystem = system: f: f rec { + inherit system; + pkgs = nixpkgs.legacyPackages.${system}; + mkPkg = name: src: inputs: + pkgs.stdenv.mkDerivation { + nativeBuildInputs = with pkgs; [ + wrapGAppsHook + gobject-introspection + meson + pkg-config + ninja + vala + wayland + wayland-scanner + python3 + ]; + propagatedBuildInputs = [pkgs.glib] ++ inputs; + pname = name; + version = readVer "${src}/version"; + src = src; + postUnpack = '' + cp --remove-destination ${./lib/gir.py} $sourceRoot/gir.py + ''; + outputs = ["out" "dev"]; + }; }; + in { - lib = { + devShells = forAllSystems({system, pkgs, ...}: import ./nix/devshell.nix { + inherit self pkgs; + }); + + lib = forAllSystems({system, pkgs, ...}: { mkLuaPackage = import ./nix/lua.nix { inherit pkgs; astal = self; }; - }; + }); - packages.${system} = with pkgs; { + packages = forAllSystems({system, pkgs, mkPkg, ...}: with pkgs;{ docs = import ./docs {inherit self pkgs;}; default = self.packages.${system}.io; @@ -76,7 +79,7 @@ self.packages.${system}.astal3 ]; }; - }; + }); }; inputs = { -- cgit v1.2.3 From d7d11b341db85ce9768fa06b6f225d713621ec56 Mon Sep 17 00:00:00 2001 From: Aylur Date: Fri, 20 Dec 2024 01:18:56 +0100 Subject: Revert "Add aarch64 Compatability to Flake (#183)" This reverts commit 23083cdec69853bc8e480807a5f93b03df340183. --- flake.nix | 69 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 33 insertions(+), 36 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 052a6f5..ac1c5e6 100644 --- a/flake.nix +++ b/flake.nix @@ -5,48 +5,45 @@ }: let inherit (builtins) replaceStrings readFile; readVer = file: replaceStrings ["\n"] [""] (readFile file); - supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; - forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: (forSystem system f)); - forSystem = system: f: f rec { - inherit system; - pkgs = nixpkgs.legacyPackages.${system}; - mkPkg = name: src: inputs: - pkgs.stdenv.mkDerivation { - nativeBuildInputs = with pkgs; [ - wrapGAppsHook - gobject-introspection - meson - pkg-config - ninja - vala - wayland - wayland-scanner - python3 - ]; - propagatedBuildInputs = [pkgs.glib] ++ inputs; - pname = name; - version = readVer "${src}/version"; - src = src; - postUnpack = '' - cp --remove-destination ${./lib/gir.py} $sourceRoot/gir.py - ''; - outputs = ["out" "dev"]; - }; - }; - in { - devShells = forAllSystems({system, pkgs, ...}: import ./nix/devshell.nix { - inherit self pkgs; - }); + system = "x86_64-linux"; # TODO: other architectures + pkgs = nixpkgs.legacyPackages.${system}; + + mkPkg = name: src: inputs: + pkgs.stdenv.mkDerivation { + nativeBuildInputs = with pkgs; [ + wrapGAppsHook + gobject-introspection + meson + pkg-config + ninja + vala + wayland + wayland-scanner + python3 + ]; + propagatedBuildInputs = [pkgs.glib] ++ inputs; + pname = name; + version = readVer "${src}/version"; + src = src; + postUnpack = '' + cp --remove-destination ${./lib/gir.py} $sourceRoot/gir.py + ''; + outputs = ["out" "dev"]; + }; + in { + devShells.${system} = import ./nix/devshell.nix { + inherit self pkgs; + }; - lib = forAllSystems({system, pkgs, ...}: { + lib = { mkLuaPackage = import ./nix/lua.nix { inherit pkgs; astal = self; }; - }); + }; - packages = forAllSystems({system, pkgs, mkPkg, ...}: with pkgs;{ + packages.${system} = with pkgs; { docs = import ./docs {inherit self pkgs;}; default = self.packages.${system}.io; @@ -79,7 +76,7 @@ self.packages.${system}.astal3 ]; }; - }); + }; }; inputs = { -- cgit v1.2.3