diff options
author | Aylur <[email protected]> | 2024-09-01 03:22:42 +0200 |
---|---|---|
committer | Aylur <[email protected]> | 2024-09-01 03:22:42 +0200 |
commit | b3a98b2901f8cd96daa5d5e2c34d4d94461caaa7 (patch) | |
tree | c17131bd50f58f620c17e4e9e43e60a886260db6 /network/flake.nix | |
parent | 652e23a6fd7da58461bbf0a1b022be0d0a0896f4 (diff) |
move to monorepo
Diffstat (limited to 'network/flake.nix')
-rw-r--r-- | network/flake.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/network/flake.nix b/network/flake.nix new file mode 100644 index 0000000..f8cf3dc --- /dev/null +++ b/network/flake.nix @@ -0,0 +1,53 @@ +{ + description = "NetworkManager wrapper library"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + outputs = { + self, + nixpkgs, + }: let + version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./version); + system = "x86_64-linux"; + pkgs = import nixpkgs {inherit system;}; + + nativeBuildInputs = with pkgs; [ + gobject-introspection + meson + pkg-config + ninja + vala + ]; + + buildInputs = with pkgs; [ + glib + networkmanager + ]; + in { + packages.${system} = rec { + default = network; + network = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-network"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + network = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = + buildInputs + ++ [ + self.packages.${system}.default + pkgs.gjs + ]; + }; + }; + }; +} |