Initial Commit
This commit is contained in:
parent
5b45525331
commit
7f8d940ef5
12 changed files with 2901 additions and 2 deletions
33
flake.nix
Normal file
33
flake.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
description = "A simple rust project";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
}: let
|
||||
forEachSystem = fn:
|
||||
nixpkgs.lib.genAttrs
|
||||
["x86_64-linux" "aarch64-linux"]
|
||||
(system: fn system nixpkgs.legacyPackages.${system});
|
||||
in {
|
||||
# Define a package for your project
|
||||
packages = forEachSystem (system: pkgs: rec {
|
||||
tinyupload = pkgs.callPackage ./nix/package.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
default = tinyupload;
|
||||
});
|
||||
|
||||
devShells = forEachSystem (system: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
DATABASE_URL = "sqlite:tinyupload.db";
|
||||
buildInputs = with pkgs; [cargo rustc sqlx-cli sqlite];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue