Ewwtilities/flake.nix

72 lines
2.2 KiB
Nix
Raw Normal View History

2023-11-06 20:35:22 -08:00
/*
TODO
2023-11-06 20:40:25 -08:00
1. Find and replace "ewwtilities" with your package name for **ALL FILES IN REPOSITORY**
2023-11-06 20:35:22 -08:00
2. Add a flake description that describes the workspace on line 27
3. Add a package description on line 70
4. (optional) uncomment `nativeBuildInputs` and `buildInputs` on lines 43 and 44 if you need openssl
5. (optional) set your project homepage, license, and maintainers list on lines 48-51
6. (optional) uncomment the NixOS module and update it for your needs
7. Delete this comment block
*/
/*
Some utility commands:
- `nix flake update --commit-lock-file`
- `nix flake lock update-input <input>`
2023-11-06 20:40:25 -08:00
- `nix build .#ewwtilities` or `nix build .`
- `nix run .#ewwtilities` or `nix run .`
2023-11-06 20:35:22 -08:00
*/
{
2023-11-08 20:31:36 -08:00
description = "A utility written in rust that my eww configuration uses";
2023-11-06 20:35:22 -08:00
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { self, nixpkgs, rust-overlay }:
let
overlays = [ (import rust-overlay) ];
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system overlays;
};
rustSettings = with pkgs; {
src = ./.;
#nativeBuildInputs = [ pkg-config ];
#buildInputs = [ openssl ];
cargoHash = nixpkgs.lib.fakeHash;
};
meta = with nixpkgs.lib; {
2023-11-08 20:31:36 -08:00
homepage = "https://git.nickiel.net";
license = [ licenses.gpl3 ];
2023-11-06 20:35:22 -08:00
platforms = [ system ];
#maintainers = with maintainers; [ ];
};
in {
devShells.${system}.default = with pkgs; mkShell {
packages = [
(pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
})
cargo-edit
bacon
];
2023-11-06 20:40:25 -08:00
inputsFrom = with self.packages.${system}; [ ewwtilities ];
2023-11-06 20:35:22 -08:00
};
packages.${system} = {
2023-11-06 20:40:25 -08:00
default = self.packages.${system}.ewwtilities;
ewwtilities = pkgs.rustPlatform.buildRustPackage (rustSettings // {
pname = "ewwtilities";
2023-11-06 20:35:22 -08:00
version = "0.1.0";
2023-11-06 20:40:25 -08:00
buildAndTestSubdir = "ewwtilities";
2023-11-08 20:31:36 -08:00
cargoHash = "sha256-vY+2bCWlW2SxzAxB9nPighjaa63qW1XttC2vLGqBGWI=";
2023-11-06 20:35:22 -08:00
meta = meta // {
description = "";
};
});
};
};
}