1
Fork 0

Add a Nix flake to build the CLI.

This commit is contained in:
Bauke 2024-03-01 14:26:47 +01:00
parent 40cb942487
commit 29c6f96173
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 28 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/result
.direnv/
coverage/
debug/

17
default.nix Normal file
View File

@ -0,0 +1,17 @@
{ lib, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "steam-rss";
version = "0.2.2";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
meta = with lib; {
description = "Get RSS feeds for Steam games";
homepage = "https://github.com/Bauke/steam-rss";
changelog = "https://github.com/Bauke/steam-rss/releases/tag/${version}";
license = with licenses; [ agpl3Plus ];
maintainers = with maintainers; [ Bauke ];
mainProgram = "steam-rss";
};
}

View File

@ -4,14 +4,22 @@
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
in
{
devShells.default = import ./shell.nix { inherit pkgs; };
packages.default = pkgs.callPackage ./. { };
}
);
}