twitterBootstrap: use finalAttrs pattern

This commit is contained in:
Pol Dellaiera 2023-07-30 22:03:51 +02:00
parent d6604d0c8a
commit 6b37793395
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -1,20 +1,28 @@
{ lib, stdenv, fetchurl, unzip }:
{ lib
, stdenv
, fetchurl
, unzip
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "bootstrap";
version = "5.3.1";
src = fetchurl {
url = "https://github.com/twbs/bootstrap/releases/download/v${version}/${pname}-${version}-dist.zip";
sha256 = "sha256-SfxkgJujf07f2vq0ViDhjGgRDCeg32L0RKDHHTWBp6Q=";
url = "https://github.com/twbs/bootstrap/releases/download/v${finalAttrs.version}/bootstrap-${finalAttrs.version}-dist.zip";
hash = "sha256-SfxkgJujf07f2vq0ViDhjGgRDCeg32L0RKDHHTWBp6Q=";
};
nativeBuildInputs = [ unzip ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir $out
cp -r * $out/
runHook postInstall
'';
meta = {
@ -22,5 +30,4 @@ stdenv.mkDerivation rec {
homepage = "https://getbootstrap.com/";
license = lib.licenses.mit;
};
}
})