Skip to content
Snippets Groups Projects
Commit b8499c81 authored by Jens Nolte's avatar Jens Nolte
Browse files

Get qd package and module from flakeInput

parent 7e375839
No related branches found
No related tags found
No related merge requests found
# This is the entry point for my NixOS configuration.
{ name, path, channel, isIso, extraLayersDir, flakeInputs, flakeOutputs }:
{ name, path, channel, isIso, extraLayersDir, flakeInputs, flakeOutputs, system }:
{ lib, config, pkgs, ... }:
let
......@@ -45,6 +45,7 @@ in
(path + "/configuration.nix")
normalSystemConfiguration
flakeInputs.homemanager.nixosModules.home-manager
flakeInputs.qd.nixosModules.qd
] ++ layerImports;
home-manager = {
......@@ -55,7 +56,14 @@ in
_module.args.isIso = lib.mkDefault false;
nixpkgs.overlays = [ (import ./pkgs) ];
nixpkgs.overlays = [
(import ./pkgs)
(self: super:
{
qd = flakeInputs.qd.packages."${system}".qd;
}
)
];
# Pin channel in nix path
nix.nixPath = [ "nixpkgs=${channel}" ];
......
......@@ -40,7 +40,7 @@ let
mkMachineConfig = { name, path, isIso }: {
imports = [
(import ./configuration.nix {
inherit name path isIso extraLayersDir flakeInputs flakeOutputs;
inherit name path isIso extraLayersDir flakeInputs flakeOutputs system;
channel = machineChannels.${name};
})
];
......
......@@ -18,7 +18,6 @@ rec {
#net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt;
net-mqtt = self.haskell.lib.unmarkBroken hsuper.net-mqtt;
q = hself.callPackage ./q {};
qd = hself.callPackage ./qd {};
qbar = hself.callPackage ./qbar {};
};
};
......@@ -39,6 +38,5 @@ rec {
};
q = self.haskellPackages.q;
qd = self.haskellPackages.qd;
qbar = self.haskellPackages.qbar;
}
{ haskell, fetchgit, callCabal2nix }:
let
repo = with builtins; fromJSON ( readFile ./repo.json );
src = fetchgit {
inherit (repo) url rev sha256;
};
in
haskell.lib.generateOptparseApplicativeCompletions ["qd" "qctl"] (
callCabal2nix "qd" src {}
)
{
"ref": "refs/heads/master",
"url": "https://git.c3pb.de/jens/qd.git",
"rev": "ec42f49c3c12855022fcaaff007ff9172472f63e",
"date": "2020-12-05T23:21:18+01:00",
"path": "/nix/store/da49nck17db2gi95lcmwq09cxdaiyy65-qd",
"sha256": "16vjnh2x0pqvfzy32rc97gza0ixmr8447jd8s5ippwkf0rc7krns",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}
#!/usr/bin/env nix-shell
#! nix-shell -i sh -p nix-prefetch-git jq
url="https://git.c3pb.de/jens/qd.git"
ref="refs/heads/master"
nix-prefetch-git --rev "$ref" --no-deepClone "$url" | jq --arg ref "$ref" '{ref: $ref} + .' > repo.json
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment