Skip to content

Commit

Permalink
Add Nix package (#75)
Browse files Browse the repository at this point in the history
* Add Nix package

* Change variable name at will's behest
  • Loading branch information
gavinleroy authored Nov 7, 2024
1 parent 4ba38af commit e7464c5
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
target
target
.envrc
.direnv
result
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
description = "A JS devtool orchestrator";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
manifest = (pkgs.lib.importTOML ./crates/depot/Cargo.toml).package;
pkgs = import nixpkgs { inherit system; };
depot-js = pkgs.rustPlatform.buildRustPackage rec {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
nativeBuildInputs = [ pkgs.git ];
# NOTE: depot's tests have a lot of external dependencies: node, biome, ...
# We'll ignore them for now and figure it out later ;)
doCheck = false;
};
in {
packages = {
default = depot-js;
};
});
}

0 comments on commit e7464c5

Please sign in to comment.