Add naersk package

This commit is contained in:
Andrey Golovizin 2021-06-27 10:52:20 +02:00
parent ae9fca20ee
commit 78bff4e247
2 changed files with 46 additions and 4 deletions

View file

@ -3,17 +3,27 @@
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nmattia/naersk";
};
outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, naersk }:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
naersk-lib = naersk.lib."${system}";
in
{
rec {
packages.azirevpn = naersk-lib.buildPackage {
pname = "azirevpn";
root = ./.;
};
defaultPackage = packages.azirevpn;
apps.azirevpn = flake-utils.lib.mkApp {
drv = packages.azirevpn;
};
defaultApp = apps.azirevpn;
devShell = pkgs.mkShell {
name = "azirevpn-env";
buildInputs = [