Create a Nix Flake module (#17)

* Add flake module

* Add optional openssl dep on linux

* Set default sql path

* No more deploy!
This commit is contained in:
Natsu Kagami 2021-11-03 15:00:18 -04:00 committed by GitHub
parent 6f84441823
commit 2449b09cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 89 additions and 62 deletions

View file

@ -16,6 +16,11 @@
root = ./.;
cargoBuildOptions = opts: opts ++ [ "--package youmubot" ];
nativeBuildInputs = nixpkgs.lib.optionals (nixpkgs.lib.strings.hasSuffix "linux" system) (with pkgs; [
pkg-config
openssl
]);
};
defaultPackage = packages.youmubot;
@ -31,5 +36,8 @@
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ];
};
# module
nixosModule = import ./module.nix defaultPackage;
});
}