Skip to content

Commit

Permalink
flake: Packaging definition.
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Feb 22, 2021
1 parent def949e commit 41c0d58
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 23 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

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

50 changes: 41 additions & 9 deletions flake.lock

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

13 changes: 10 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
naersk.url = "github:nmattia/naersk";
};

outputs = inputs@{ self, nixpkgs, rust-overlay, flake-utils, ... }:
outputs = inputs@{ self, nixpkgs, naersk, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ rust-overlay.overlay ]; };
naerskLib = pkgs.callPackage naersk {
inherit (pkgs.rust-bin.nightly.latest) rustc cargo;
};
in rec {
# packages.helix = pkgs.callPackage ./default.nix {};
# defaultPackage = packages.helix;
packages.helix = naerskLib.buildPackage {
pname = "helix";
root = ./.;
};
defaultPackage = packages.helix;
devShell = pkgs.callPackage ./shell.nix {};
});
}

0 comments on commit 41c0d58

Please sign in to comment.