time-ghc-modules: init at 1.0.0 (#140847)

* time-ghc-modules: init at 1.0.0
* Move non-binaries out of the bin folder
This commit is contained in:
Tom McLaughlin 2021-10-08 17:46:32 -06:00 committed by GitHub
parent f23731c768
commit 06e0a8e43a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, sqlite
, python3
, coreutils
, findutils
, gnused
}:
stdenv.mkDerivation rec {
pname = "time-ghc-modules";
version = "1.0.1";
src = fetchFromGitHub {
owner = "codedownio";
repo = "time-ghc-modules";
rev = version;
sha256 = "0s6540gllhjn7366inhwa70rdnngnhbi07jn1h6x8a0pi71wdfm9";
};
nativeBuildInputs = [makeWrapper];
buildPhase = ''
runHook preBuild
mkdir -p $out/bin
cp ./time-ghc-modules $out/bin/time-ghc-modules
wrapProgram $out/bin/time-ghc-modules --prefix PATH : ${lib.makeBinPath [ sqlite python3 coreutils findutils gnused ]} \
--set PROCESS_SCRIPT $out/lib/process \
--set HTML_FILE $out/lib/index.html
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
install -m 444 ./dist/index.html $out/lib
install ./scripts/process $out/lib
runHook postInstall
'';
meta = with lib; {
description = "Analyze GHC .dump-timings files";
homepage = "https://github.com/codedownio/time-ghc-modules";
license = licenses.mit;
maintainers = [ maintainers.thomasjm ];
platforms = platforms.all;
};
}

View file

@ -15050,6 +15050,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security CoreServices;
};
time-ghc-modules = callPackage ../development/tools/time-ghc-modules { };
tflint = callPackage ../development/tools/analysis/tflint { };
tfsec = callPackage ../development/tools/analysis/tfsec { };