comma/flake.nix
DavHau 54149dc417
flake compatibility + index management (#11)
* compatibility to flake based systems

  - add flake.nix
  - provide interface for updating the index

* pin nix to version 2.3

* Update ,

Co-authored-by: Artturi <Artturin@artturin.com>

* remove db outdated error

Co-authored-by: Artturi <Artturin@artturin.com>
2022-02-17 14:06:02 +07:00

37 lines
874 B
Nix

{
description = "Comma runs software without installing it";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, }:
let
b = builtins;
lib = nixpkgs.lib;
supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
forAllSystems = f: lib.genAttrs supportedSystems
(system: f system (import nixpkgs { inherit system; }));
in
rec {
packages = forAllSystems
(system: pkgs: {
comma = import ./default.nix {
inherit pkgs;
updateScript = apps."${system}".update-index.program;
};
});
defaultPackage = forAllSystems (system: pkgs: packages."${system}".comma);
apps = forAllSystems
(system: pkgs: {
update-index = {
type = "app";
program = b.toString (pkgs.callPackage ./update-index.nix {});
};
});
};
}