2021-03-29 20:00:01 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2021-03-29 20:04:56 +02:00
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
2021-03-29 20:00:01 +02:00
|
|
|
};
|
|
|
|
|
2021-03-31 18:03:24 +02:00
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
2021-03-29 20:00:01 +02:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
|
|
|
in
|
|
|
|
{
|
2021-03-31 18:03:24 +02:00
|
|
|
defaultPackage = pkgs.rustPlatform.buildRustPackage {
|
2021-03-29 22:47:42 +02:00
|
|
|
pname = "lohr";
|
2021-06-04 17:38:37 +02:00
|
|
|
version = "0.4.1";
|
2021-03-31 18:03:24 +02:00
|
|
|
|
|
|
|
src = ./.;
|
|
|
|
|
2021-06-04 17:38:37 +02:00
|
|
|
cargoSha256 = "sha256-cUxUTOp21NzYqmLQc3XmOly0k9xo5wRqsen4iiZfg/Y=";
|
2021-03-30 20:09:11 +02:00
|
|
|
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "A Git mirroring tool";
|
|
|
|
homepage = "https://github.com/alarsyo/lohr";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2021-03-29 22:47:42 +02:00
|
|
|
};
|
2021-03-29 20:00:01 +02:00
|
|
|
|
|
|
|
defaultApp = flake-utils.lib.mkApp {
|
|
|
|
drv = self.defaultPackage."${system}";
|
|
|
|
};
|
|
|
|
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2021-03-31 18:03:24 +02:00
|
|
|
cargo
|
|
|
|
clippy
|
2021-03-29 20:00:01 +02:00
|
|
|
nixpkgs-fmt
|
|
|
|
pre-commit
|
|
|
|
rustPackages.clippy
|
2021-03-31 18:03:24 +02:00
|
|
|
rustc
|
2021-03-29 20:00:01 +02:00
|
|
|
rustfmt
|
|
|
|
];
|
|
|
|
|
|
|
|
RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|