Skip to content

Commit

Permalink
Merge pull request #6 from nullishamy/build/package-for-nix
Browse files Browse the repository at this point in the history
build: package for nix
  • Loading branch information
iruzo authored May 9, 2024
2 parents b7e705e + 8949511 commit 69d80c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
19 changes: 1 addition & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
pxalarm-repo = {
url = "github:iruzo/pxalarm";
flake = false;
};
};

outputs = { self, nixpkgs, pxalarm-repo, ... } @ inputs: let
outputs = {
self,
nixpkgs,
...
} @ inputs: let
systems = [
"aarch64-darwin"
"aarch64-linux"
Expand All @@ -18,16 +18,23 @@
"x86_64-linux"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);

in {
in rec {
formatter = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.alejandra);

packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-pxalarm = pkgs.writeShellScriptBin "pxalarm" (builtins.readFile ./pxalarm);
in rec {
pxalarm = pkgs-pxalarm;
default = pxalarm;
});

devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-pxalarm = pkgs.writeShellScriptBin "pxalarm" (builtins.readFile "${pxalarm-repo}/pxalarm");
pkgs-pxalarm = packages.${system}.default;
in rec {
default = pxalarm;
pxalarm =
Expand Down

0 comments on commit 69d80c6

Please sign in to comment.