about summary refs log tree commit diff stats
path: root/pkgs/by-name/ya/yambar-cpu/flake.nix
blob: 6480a40d0338c78d2fbe69bc29796e014cb1dcdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  description = "A smart way to check your cpu usage";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    crane.url = "github:ipetkov/crane";
    crane.inputs.nixpkgs.follows = "nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = {
    self,
    nixpkgs,
    crane,
    flake-utils,
    ...
  }:
    flake-utils.lib.eachDefaultSystem (system: let
      craneLib = crane.mkLib pkgs;
      craneBuild = craneLib.buildPackage {
        src = craneLib.cleanCargoSource ./.;

        doCheck = true;
      };
    in {
      packages.default = craneBuild;
      legacyPackages.default = craneBuild;
      app.default = {
        type = "app";
        program = "${self.packages.${system}.default}/bin/cpu_usage";
      };
    });
}
# vim: ts=2