From 32d09ab0a7cd2aa933afeba5a96abe23b7ed240e Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Mon, 3 Apr 2023 17:31:32 +0300 Subject: [PATCH] wd2: build using flake instead of git submodule --- .gitmodules | 3 --- README.md | 4 ++-- flake.lock | 26 +++++++++++++++++++++++++- flake.nix | 9 +++++++-- pkgs/wd2 | 1 - 5 files changed, 34 insertions(+), 9 deletions(-) delete mode 100644 .gitmodules delete mode 160000 pkgs/wd2 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index db87d2a..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "pkgs/wd2"] - path = pkgs/wd2 - url = gitea@git.pleshevski.ru:pleshevskiy/wd2.git diff --git a/README.md b/README.md index 4e85a95..8cee3f5 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ nix build git+https://git.pleshevski.ru/mynix/tools# ## As one-time executable application ```sh -nix run git+https://git.pleshevski.ru/mynix/tools\?submodules=1# +nix run git+https://git.pleshevski.ru/mynix/tools# ``` ## Using nix-profile ```sh -nix profile install git+https://git.pleshevski.ru/mynix/tools\?submodules=1# +nix profile install git+https://git.pleshevski.ru/mynix/tools# ``` ## As overlay for your flake diff --git a/flake.lock b/flake.lock index d29a23c..6cf7a7b 100644 --- a/flake.lock +++ b/flake.lock @@ -57,7 +57,31 @@ "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "poetry2nix": "poetry2nix" + "poetry2nix": "poetry2nix", + "wd2": "wd2" + } + }, + "wd2": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680529255, + "narHash": "sha256-5MCwQKCpi3keKJ64GHnQ8XPibDfK+6oVDNr4lA9XNns=", + "ref": "refs/heads/main", + "rev": "bb99c5585b5a2e1edcdaf8b22f76ba4bbbb889dc", + "revCount": 21, + "type": "git", + "url": "https://git.pleshevski.ru/pleshevskiy/wd2" + }, + "original": { + "type": "git", + "url": "https://git.pleshevski.ru/pleshevskiy/wd2" } } }, diff --git a/flake.nix b/flake.nix index b2bdac3..72ba834 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,17 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; + poetry2nix.url = "github:nix-community/poetry2nix"; poetry2nix.inputs.nixpkgs.follows = "nixpkgs"; poetry2nix.inputs.flake-utils.follows = "flake-utils"; + + wd2.url = "git+https://git.pleshevski.ru/pleshevskiy/wd2"; + wd2.inputs.nixpkgs.follows = "nixpkgs"; + wd2.inputs.flake-utils.follows = "flake-utils"; }; - outputs = { nixpkgs, flake-utils, poetry2nix, ... }: + outputs = { nixpkgs, flake-utils, poetry2nix, ... } @ inputs: let inherit (builtins) listToAttrs mapAttrs; @@ -20,7 +25,7 @@ inherit d2-unwrapped d2plugin-tala; }; fawltydeps = pkgs'.callPackage ./pkgs/fawltydeps { }; - wd2 = pkgs'.callPackage ./pkgs/wd2/wd2.nix { inherit d2; }; + wd2 = pkgs'.callPackage "${inputs.wd2}/wd2.nix" { inherit d2; }; in { inherit d2 d2plugin-tala wd2 fawltydeps; diff --git a/pkgs/wd2 b/pkgs/wd2 deleted file mode 160000 index bb99c55..0000000 --- a/pkgs/wd2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bb99c5585b5a2e1edcdaf8b22f76ba4bbbb889dc