Initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
hp = nixpkgs.legacyPackages.${system}.haskellPackages.override (old: {
|
||||
overrides = pkgs.lib.composeExtensions (old.overrides or (_: _: {})) (f: p: {
|
||||
home-assistant-controller = pkgs.haskell.lib.overrideCabal (f.callPackage ./. {}) (_: {
|
||||
preBuild = ''
|
||||
export COMMIT="${self.rev or "unknown"}"
|
||||
'';
|
||||
});
|
||||
});
|
||||
});
|
||||
in rec {
|
||||
packages.home-assistant-controller = pkgs.haskell.lib.justStaticExecutables hp.home-assistant-controller;
|
||||
defaultPackage = packages.home-assistant-controller;
|
||||
devShell = hp.shellFor {
|
||||
packages = h: [h.home-assistant-controller];
|
||||
withHoogle = false;
|
||||
buildInputs = with pkgs; [
|
||||
cabal-install
|
||||
hp.hlint
|
||||
cabal2nix
|
||||
ghcid
|
||||
|
||||
hp.graphmod
|
||||
|
||||
hp.haskell-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user