47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
description = "Noisebell - RSS/Atom feed service";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
crane.url = "github:ipetkov/crane";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, crane, rust-overlay }:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
};
|
|
|
|
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
|
|
|
|
src = craneLib.cleanCargoSource ./.;
|
|
|
|
commonArgs = {
|
|
inherit src;
|
|
strictDeps = true;
|
|
doCheck = false;
|
|
};
|
|
|
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
|
|
|
noisebell-rss = craneLib.buildPackage (commonArgs // {
|
|
inherit cargoArtifacts;
|
|
});
|
|
in
|
|
{
|
|
packages.${system}.default = noisebell-rss;
|
|
|
|
nixosModules.default = import ./module.nix self;
|
|
|
|
devShells.${system}.default = craneLib.devShell {
|
|
packages = [ pkgs.rust-analyzer ];
|
|
};
|
|
};
|
|
}
|