From 62be37ac4b3646a9bc4adaf331d82391b444968a Mon Sep 17 00:00:00 2001 From: isabel Date: Tue, 14 May 2024 00:17:51 +0100 Subject: [PATCH 1/2] nixdoc: init at 3.0.2 --- pkgs/by-name/ni/nixdoc/default.nix | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/by-name/ni/nixdoc/default.nix diff --git a/pkgs/by-name/ni/nixdoc/default.nix b/pkgs/by-name/ni/nixdoc/default.nix new file mode 100644 index 0000000..e1e7f19 --- /dev/null +++ b/pkgs/by-name/ni/nixdoc/default.nix @@ -0,0 +1,33 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + darwin, +}: let + version = "3.0.2"; +in + rustPlatform.buildRustPackage { + pname = "nixdoc"; + inherit version; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = "nixdoc"; + rev = "v${version}"; + sha256 = "sha256-V3MAvbdYk3DL064UYcJE9HmwfQBwpMxVXWiAKX6honA="; + }; + + cargoHash = "sha256-RFxTjLiJCEc42Mb8rcayOFHkYk2GfpgsO3+hAaRwHgs="; + + buildInputs = lib.optionals stdenv.isDarwin [darwin.Security]; + + meta = { + description = "Generate documentation for Nix functions"; + mainProgram = "nixdoc"; + homepage = "https://github.com/nix-community/nixdoc"; + license = lib.licenses.gpl3; + # maintainers = with lib.maintainers; [ infinisil hsjobeki ]; + platforms = lib.platforms.unix; + }; + } From b47227447971321cbd3c88b45959413ad2877555 Mon Sep 17 00:00:00 2001 From: isabel Date: Tue, 14 May 2024 00:18:19 +0100 Subject: [PATCH 2/2] flake: remove upstream dependancy --- flake.lock | 22 +--------------------- flake.nix | 11 +++-------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/flake.lock b/flake.lock index d146eee..5999137 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,6 @@ { "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1715447595, - "narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "062ca2a9370a27a35c524dc82d540e6e9824b652", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } + "root": {} }, "root": "root", "version": 7 diff --git a/flake.nix b/flake.nix index 0f0d49b..30263b8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,18 +1,11 @@ { - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - }; - - outputs = - { self, nixpkgs, ... }: + outputs = { self, ... }: let forAllSystems = self.lib.genAttrs self.lib.systems.flakeExposed; in { lib = import ./lib; - nixPackages = forAllSystems (system: nixpkgs.legacyPackages.${system}); - auxPackages = forAllSystems (system: ( let requiredVersion = import ./lib/minver.nix; in @@ -42,6 +35,8 @@ ) ); + legacyPackages = forAllSystems (system: import ./. { inherit system; }); + # To test, run nix build .#tests.x86_64-linux.release tests = forAllSystems (system: { systems = import ./lib/tests/systems.nix;