From 59ae28722f6092e7f8c572d3cb342c0dfec9cb6e Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Sat, 17 Sep 2022 18:19:39 +0200 Subject: [PATCH] add holochain-launcher --- .../configuration/graphical-fullblown.nix | 1 + .../programs/holochain-launcher.nix | 7 ++++++ nix/overlays/overrides.nix | 4 +++- nix/sources.json | 12 +++++----- nix/sources.nix | 22 ++++++++++++++++++- 5 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 nix/home-manager/programs/holochain-launcher.nix diff --git a/nix/home-manager/configuration/graphical-fullblown.nix b/nix/home-manager/configuration/graphical-fullblown.nix index acff15f..8792ecf 100644 --- a/nix/home-manager/configuration/graphical-fullblown.nix +++ b/nix/home-manager/configuration/graphical-fullblown.nix @@ -28,6 +28,7 @@ in { zshCurried ../programs/podman.nix ../programs/vscode + ../programs/holochain-launcher.nix ]; nixpkgs.config = { diff --git a/nix/home-manager/programs/holochain-launcher.nix b/nix/home-manager/programs/holochain-launcher.nix new file mode 100644 index 0000000..619547d --- /dev/null +++ b/nix/home-manager/programs/holochain-launcher.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = [ + pkgs.holochain-launcher + ]; +} diff --git a/nix/overlays/overrides.nix b/nix/overlays/overrides.nix index 577185b..7bf5dcb 100644 --- a/nix/overlays/overrides.nix +++ b/nix/overlays/overrides.nix @@ -7,7 +7,7 @@ let nixpkgs-master = import { inherit (super) config; }; nixpkgs-unstable = import { inherit (super) config; }; - nixpkgs-staging-steveej = import sources.nixpkgs_staging_steveej { inherit (super) config; }; + pr-holochain-launcher-bin = import sources.pr-holochain-launcher-bin { inherit (super) config; }; in { inherit nixpkgs-master; @@ -32,5 +32,7 @@ in { ]); }); + inherit (pr-holochain-launcher-bin) holochain-launcher; + # logseq = nixpkgs-staging-steveej.logseq; } diff --git a/nix/sources.json b/nix/sources.json index a01ed4b..ff4275b 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -11,16 +11,16 @@ "url": "https://github.com/NixOS/nixpkgs/archive/26fe7618c7efbbfe28db9a52a21fb87e67ebaf06.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, - "nixpkgs_staging_steveej": { - "branch": "staging-steveej", + "pr-holochain-launcher-bin": { + "branch": "pr-holochain-launcher-bin", "description": "Nix Packages collection", - "homepage": "https://github.com/steveeJ-forks/nixpkgs", + "homepage": null, "owner": "steveeJ-forks", "repo": "nixpkgs", - "rev": "bc052ff801e0c4917e9c78232e59c93f993f40c1", - "sha256": "1yb8pv0gn3m0zgj2sgq6qswq984p40bgz9j7h1pd6zkji9kj8yzh", + "rev": "11f978d53355759a47d60d688709921f2e0fb158", + "sha256": "03mdx63gjynj297b55wkjcnaicsm8n2chgpp2v80sx8ixgllmxiw", "type": "tarball", - "url": "https://github.com/steveeJ-forks/nixpkgs/archive/bc052ff801e0c4917e9c78232e59c93f993f40c1.tar.gz", + "url": "https://github.com/steveeJ-forks/nixpkgs/archive/11f978d53355759a47d60d688709921f2e0fb158.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/nix/sources.nix b/nix/sources.nix index 1938409..9a01c8a 100644 --- a/nix/sources.nix +++ b/nix/sources.nix @@ -31,8 +31,28 @@ let if spec ? branch then "refs/heads/${spec.branch}" else if spec ? tag then "refs/tags/${spec.tag}" else abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!"; + submodules = if spec ? submodules then spec.submodules else false; + submoduleArg = + let + nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0; + emptyArgWithWarning = + if submodules == true + then + builtins.trace + ( + "The niv input \"${name}\" uses submodules " + + "but your nix's (${builtins.nixVersion}) builtins.fetchGit " + + "does not support them" + ) + {} + else {}; + in + if nixSupportsSubmodules + then { inherit submodules; } + else emptyArgWithWarning; in - builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; }; + builtins.fetchGit + ({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg); fetch_local = spec: spec.path;