60 lines
1.5 KiB
Nix
60 lines
1.5 KiB
Nix
{
|
|
description = "Build a cargo project without extra checks";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
crane.url = "github:ipetkov/crane";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
crane,
|
|
flake-utils,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
inherit (pkgs) lib;
|
|
|
|
stripDockerImage = pkgs.stdenv.mkDerivation {
|
|
name = "strip-docker-image";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "mvanholsteijn";
|
|
repo = "strip-docker-image";
|
|
rev = "2bec01f2718e741a1b7fceb39ba3c1a21613e402";
|
|
hash = "sha256-ZwInCPPtDxCV2nghI70eftFrOmDYIbxTNw3k/fdtbjQ=";
|
|
};
|
|
installPhase = ''
|
|
install -Dm755 bin/strip-docker-image $out/bin/strip-docker-image
|
|
'';
|
|
};
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShellNoCC {
|
|
|
|
VITE_API_URL = "http://0.0.0.0:3000";
|
|
VITE_PROD_API_URL = "https://stream.h.doloro.co.uk";
|
|
ADMIN_REF_CODE = "meowmeowpurrrmeow";
|
|
|
|
# Additional dev-shell environment variables can be set directly
|
|
# MY_CUSTOM_DEVELOPMENT_VAR = "something else";
|
|
|
|
# Extra inputs can be added here; cargo and rustc are provided by default.
|
|
packages = [
|
|
pkgs.nodejs
|
|
pkgs.pnpm
|
|
pkgs.just
|
|
stripDockerImage
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|