update nix flake to support more platforms

This commit is contained in:
Green Sky 2023-09-16 23:54:51 +02:00
parent 73ee0f905b
commit f5c7261805
No known key found for this signature in database
2 changed files with 115 additions and 79 deletions

View File

@ -1,5 +1,23 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1694553957,
@ -18,8 +36,24 @@
},
"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",

View File

@ -5,14 +5,15 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs }:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { inherit system; };
in {
packages.${system}.default = pkgs.stdenv.mkDerivation {
packages.default = pkgs.stdenv.mkDerivation {
pname = "tomato";
version = "0.0.0";
@ -91,9 +92,10 @@
shellHook = "echo hello to tomato dev shell!";
};
apps.${system}.default = {
program = "${self.packages.${system}.default}/bin/tomato";
apps.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/tomato";
};
};
}
);
}