Skip to content

Commit

Permalink
added(flake): packages
Browse files Browse the repository at this point in the history
  • Loading branch information
massivebird committed Nov 28, 2024
1 parent 4b0d2ea commit 22905cc
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 17 deletions.
27 changes: 25 additions & 2 deletions flake.lock

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

36 changes: 21 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,35 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, ... }:
outputs = { self, nixpkgs, flake-utils, naersk, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
with pkgs;
{
packages.default = naersk-lib.buildPackage ./.;

# `nix develop`
devShell = mkShell {
packages = [
cargo
openssl
pkg-config
clippy
rust-analyzer
rustc
];
};
# for `nix develop`:
shells.default = with pkgs;
mkShell {
buildInputs = [
cargo
openssl
pkg-config
clippy
rust-analyzer
rustc
];
};
}
);
}

0 comments on commit 22905cc

Please sign in to comment.