nix: init flake

This commit is contained in:
Mustafa Çalışkan 2022-01-08 21:33:50 +03:00
parent 1e51827ba3
commit 8d184958d8
2 changed files with 72 additions and 4 deletions

43
flake.lock generated Normal file
View File

@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1641528457,
"narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ff377a78794d412a35245e05428c8f95fef3951f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,7 +1,32 @@
{
description = "PolyMC";
description = "PolyMC flake";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = inputs: {
overlay = import ./packages/nix/overlay.nix;
};
outputs = inputs@{ self, nixpkgs, flake-utils,... }:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
};
packages = {
polymc = pkgs.libsForQt5.callPackage ./package/nix {};
};
apps = {
polymc = flake-utils.lib.mkApp {
name = "PolyMC";
drv = packages.polymc;
};
};
in
{
inherit packages apps;
defaultPackage = packages.polymc;
defaultApp = apps.polymc;
overlay = import ./packages/nix/overlay.nix;
}
);
}