Merge pull request #297714 from NixOS/devenv

devenv: init at 1.0.1
This commit is contained in:
Pol Dellaiera 2024-03-21 16:29:41 +01:00 committed by GitHub
commit 952804a3d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2167 additions and 0 deletions

2126
pkgs/by-name/de/devenv/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
{ stdenv, lib, openssl, darwin, libgit2, makeWrapper, nix, pkg-config, rustPlatform, cachix, fetchFromGitHub }:
let
devenv_nix = nix.overrideAttrs (old: {
version = "2.21-devenv";
src = fetchFromGitHub {
owner = "domenkozar";
repo = "nix";
rev = "c5bbf14ecbd692eeabf4184cc8d50f79c2446549";
hash = "sha256-zvCqeUO2GLOm7jnU23G4EzTZR7eylcJN+HJ5svjmubI=";
};
buildInputs = old.buildInputs ++ [ libgit2 ];
doCheck = false;
doInstallCheck = false;
});
version = "1.0.1";
in rustPlatform.buildRustPackage {
pname = "devenv";
inherit version;
src = fetchFromGitHub {
owner = "cachix";
repo = "devenv";
rev = "v${version}";
hash = "sha256-9LnGe0KWqXj18IV+A1panzXQuTamrH/QcasaqnuqiE0=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ makeWrapper pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
];
postInstall = ''
wrapProgram $out/bin/devenv --set DEVENV_NIX ${devenv_nix} --prefix PATH ":" "$out/bin:${cachix}/bin"
'';
}