forked from mirrors/deskwhich
- dropped cursed rust devshell in favour of rust overlay - dropped cargo hash in favour of lock file reference (doesn't break anymore :) - add formatter to flake outputs - nix fmt (rfc style) - nix flake update - cargo fmt - cargo update
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
{
|
|
description = "confwhich: easily obtain info about XDG_CONFIG useage";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
|
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ nixpkgs, rust-overlay, ... }:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
|
in
|
|
{
|
|
devShells = forAllSystems (
|
|
system:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
in
|
|
{
|
|
default = pkgs.mkShell {
|
|
buildInputs = [
|
|
rustToolchain
|
|
];
|
|
};
|
|
}
|
|
);
|
|
|
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
|
|
|
packages = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
deskwhich-pkg = (pkgs.callPackage ./nix/package.nix { });
|
|
in
|
|
{
|
|
deskwhich = deskwhich-pkg;
|
|
default = deskwhich-pkg;
|
|
}
|
|
);
|
|
};
|
|
}
|