mirror of https://github.com/voidlizard/hbs2
bf6-git-hbs2
This commit is contained in:
parent
da131c0110
commit
186d4c5f01
|
@ -134,10 +134,13 @@ outputs = { self, nixpkgs, flake-utils, ... }@inputs:
|
||||||
];
|
];
|
||||||
|
|
||||||
makePackages = pkgs:
|
makePackages = pkgs:
|
||||||
pkgs.lib.mapAttrs
|
let ps = pkgs.lib.mapAttrs
|
||||||
(_name: packagePostOverrides) # we can't apply overrides inside our overlay because it will remove linking info
|
(_name: packagePostOverrides) # we can't apply overrides inside our overlay because it will remove linking info
|
||||||
(pkgs.lib.getAttrs packageNames (ourHaskellPackages pkgs))
|
(pkgs.lib.getAttrs packageNames (ourHaskellPackages pkgs))
|
||||||
;
|
;
|
||||||
|
in ps // {
|
||||||
|
bf6-git-hbs2 = pkgs.callPackage ./nix/bf6-hbs2-git.nix { inherit (ps) suckless-conf; };
|
||||||
|
};
|
||||||
|
|
||||||
packagesDynamic = makePackages pkgs;
|
packagesDynamic = makePackages pkgs;
|
||||||
packagesStatic = makePackages pkgs.pkgsStatic;
|
packagesStatic = makePackages pkgs.pkgsStatic;
|
||||||
|
|
|
@ -127,47 +127,47 @@ library
|
||||||
hs-source-dirs: hbs2-git-client-lib
|
hs-source-dirs: hbs2-git-client-lib
|
||||||
|
|
||||||
|
|
||||||
executable hbs2-git-subscribe
|
-- executable hbs2-git-subscribe
|
||||||
import: shared-properties
|
-- import: shared-properties
|
||||||
main-is: Main.hs
|
-- main-is: Main.hs
|
||||||
-- other-modules:
|
-- -- other-modules:
|
||||||
-- other-extensions:
|
-- -- other-extensions:
|
||||||
build-depends:
|
-- build-depends:
|
||||||
base, hbs2-git
|
-- base, hbs2-git
|
||||||
, binary
|
-- , binary
|
||||||
, vector
|
-- , vector
|
||||||
, optparse-applicative
|
-- , optparse-applicative
|
||||||
|
|
||||||
hs-source-dirs: git-hbs2-subscribe
|
-- hs-source-dirs: git-hbs2-subscribe
|
||||||
default-language: GHC2021
|
-- default-language: GHC2021
|
||||||
|
|
||||||
executable git-hbs2
|
-- executable git-hbs2
|
||||||
import: shared-properties
|
-- import: shared-properties
|
||||||
main-is: Main.hs
|
-- main-is: Main.hs
|
||||||
-- other-modules:
|
-- -- other-modules:
|
||||||
-- other-extensions:
|
-- -- other-extensions:
|
||||||
build-depends:
|
-- build-depends:
|
||||||
base, hbs2-git
|
-- base, hbs2-git
|
||||||
, binary
|
-- , binary
|
||||||
, vector
|
-- , vector
|
||||||
, optparse-applicative
|
-- , optparse-applicative
|
||||||
|
|
||||||
hs-source-dirs: git-hbs2
|
-- hs-source-dirs: git-hbs2
|
||||||
default-language: GHC2021
|
-- default-language: GHC2021
|
||||||
|
|
||||||
|
|
||||||
executable git-remote-hbs2
|
-- executable git-remote-hbs2
|
||||||
import: shared-properties
|
-- import: shared-properties
|
||||||
main-is: Main.hs
|
-- main-is: Main.hs
|
||||||
-- other-modules:
|
-- -- other-modules:
|
||||||
-- other-extensions:
|
-- -- other-extensions:
|
||||||
build-depends:
|
-- build-depends:
|
||||||
base, hbs2-git
|
-- base, hbs2-git
|
||||||
, binary
|
-- , binary
|
||||||
, vector
|
-- , vector
|
||||||
, optparse-applicative
|
-- , optparse-applicative
|
||||||
|
|
||||||
hs-source-dirs: git-remote-hbs2
|
-- hs-source-dirs: git-remote-hbs2
|
||||||
default-language: GHC2021
|
-- default-language: GHC2021
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
writeTextFile,
|
||||||
|
stdenv,
|
||||||
|
suckless-conf,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "bf6-git-hbs2";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
installPhase = let
|
||||||
|
name = "git-hbs2";
|
||||||
|
withLines = f: s: lib.strings.concatStringsSep "\n" (f (lib.strings.splitString "\n" s));
|
||||||
|
p = writeTextFile {
|
||||||
|
inherit name;
|
||||||
|
text = lib.strings.concatStringsSep "\n" [
|
||||||
|
''#! ${suckless-conf}/bin/bf6 file''
|
||||||
|
(withLines (lib.lists.drop 1) (builtins.readFile ../hbs2-git3/bf6/git-hbs2))
|
||||||
|
];
|
||||||
|
executable = true;
|
||||||
|
destination = "/bin/${name}";
|
||||||
|
};
|
||||||
|
in ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${p}/bin/${name} $out/bin
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue