about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-07-30 22:03:51 +0200
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-07-30 22:05:32 +0200
commit6b377933957214303480f482bcd0c54db4d19fe1 (patch)
treecb7ed2cb2780a73d4c7e939b01babe403444a9e6
parentd6604d0c8a808dbaf984ea7064037f52c1f5daf5 (diff)
twitterBootstrap: use `finalAttrs` pattern
-rw-r--r--pkgs/development/web/twitter-bootstrap/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/development/web/twitter-bootstrap/default.nix b/pkgs/development/web/twitter-bootstrap/default.nix
index 4536f36afffdb..aad89980645dd 100644
--- a/pkgs/development/web/twitter-bootstrap/default.nix
+++ b/pkgs/development/web/twitter-bootstrap/default.nix
@@ -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;
   };
-
-}
+})