flake.nix
1{
2 description = "concurrently - Run multiple commands with multiplexed output";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6 flake-utils.url = "github:numtide/flake-utils";
7 };
8
9 outputs = { self, nixpkgs, flake-utils }:
10 flake-utils.lib.eachDefaultSystem (system:
11 let
12 pkgs = nixpkgs.legacyPackages.${system};
13 in
14 {
15 packages = {
16 default = pkgs.stdenvNoCC.mkDerivation {
17 pname = "concurrently";
18 version = "1.1.0";
19
20 src = ./.;
21
22 dontBuild = true;
23 dontConfigure = true;
24
25 installPhase = ''
26 mkdir -p $out/bin
27 cp concurrently $out/bin/concurrently
28 chmod +x $out/bin/concurrently
29
30 # Patch shebang to use nixpkgs bash
31 substituteInPlace $out/bin/concurrently \
32 --replace "#!/usr/bin/env bash" "#!${pkgs.bash}/bin/bash"
33 '';
34
35 meta = with pkgs.lib; {
36 description = "Run multiple commands with multiplexed, colorized output";
37 homepage = "https://kilimanjaro.io/concurrently";
38 license = licenses.mit;
39 platforms = platforms.all;
40 mainProgram = "concurrently";
41 };
42 };
43 };
44
45 apps = {
46 default = flake-utils.lib.mkApp {
47 drv = self.packages.${system}.default;
48 };
49 };
50 });
51}