Skip to content

Instantly share code, notes, and snippets.

@B4dM4n
Last active June 21, 2020 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save B4dM4n/7dec32408bd8355f6cf86381243cfd90 to your computer and use it in GitHub Desktop.
Save B4dM4n/7dec32408bd8355f6cf86381243cfd90 to your computer and use it in GitHub Desktop.
nix flake check system example
nix flake check git+https://gist.github.com/7dec32408bd8355f6cf86381243cfd90.git
{
"nodes": {
"nixpkgs": {
"info": {
"lastModified": 1592752255,
"narHash": "sha256-ptxZTlo8sf1k8G3oWUGTzVXSx2IYavEZIEy1sxBxElI="
},
"locked": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7daa00707d30cc74d153c6a5134721be1955c1ca",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 5
}
{
outputs = { self, nixpkgs }:
with nixpkgs.lib;
let
forAllSystems = genAttrs (attrNames nixpkgs.legacyPackages);
in
{
apps = forAllSystems (system: {
hello = {
type = "app";
program = "${nixpkgs.legacyPackages.${system}.writeShellScript "hello" "echo Hello"}";
};
});
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment