overlays: add recipemd

Remove unused overlays
This commit is contained in:
Tim Schubert 2024-01-01 17:20:58 +01:00
parent 31b1843677
commit 71629c7966
Signed by: dadada
SSH key fingerprint: SHA256:bFAjFH3hR8zRBaJjzQDjc3o4jqoq5EZ87l+KXEjxIz0
7 changed files with 77 additions and 104 deletions

78
flake.lock generated
View file

@ -9,16 +9,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1694733633, "lastModified": 1703089996,
"narHash": "sha256-/o/OubAsPMbxqru59tLlWzUI7LBNDaoW4rFwQ2Smxcg=", "narHash": "sha256-ipqShkBmHKC9ft1ZAsA6aeKps32k7+XZSPwfxeHLsAU=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "54693c91d923fecb4cf04c4535e3d84f8dec7919", "rev": "564595d0ad4be7277e07fa63b5a991b3c645655d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ryantm", "owner": "ryantm",
"ref": "0.14.0", "ref": "0.15.0",
"repo": "agenix", "repo": "agenix",
"type": "github" "type": "github"
} }
@ -162,26 +162,6 @@
"type": "github" "type": "github"
} }
}, },
"naersk": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1698420672,
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
"owner": "nix-community",
"repo": "naersk",
"rev": "aeb58d5e8faead8980a807c840232697982d47b9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1693701915, "lastModified": 1693701915,
@ -250,30 +230,6 @@
"type": "github" "type": "github"
} }
}, },
"recipemd": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1647022391,
"narHash": "sha256-TZih8S/GGmmONaEZchFw0sFS6U9pa+BjaGzNUf1ahi4=",
"owner": "dadada",
"repo": "recipemd",
"rev": "ef3ce521ce4fdc4e2cedb92102433c8a0a9d0335",
"type": "github"
},
"original": {
"owner": "dadada",
"ref": "nix-flake",
"repo": "recipemd",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -282,39 +238,13 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"homePage": "homePage", "homePage": "homePage",
"naersk": "naersk",
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"recipemd": "recipemd",
"rust-overlay": "rust-overlay",
"systems": "systems", "systems": "systems",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
} }
}, },
"rust-overlay": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1703384182,
"narHash": "sha256-g5K8bFBCIQ3x/j/MFTpkZo4It5SGWPwhBp/lASiy+pA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "cb6395cb3c2f69ad028914c90bce833e51d339c9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View file

@ -16,13 +16,8 @@
url = "github:dadada/dadada.li"; url = "github:dadada/dadada.li";
flake = false; flake = false;
}; };
recipemd = {
url = "github:dadada/recipemd/nix-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
agenix = { agenix = {
url = "github:ryantm/agenix/0.14.0"; url = "github:ryantm/agenix/0.15.0";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
devshell = { devshell = {
@ -38,15 +33,6 @@
url = "github:NixOS/flake-registry"; url = "github:NixOS/flake-registry";
flake = false; flake = false;
}; };
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default"; systems.url = "github:nix-systems/default";
treefmt-nix = { treefmt-nix = {
url = "github:numtide/treefmt-nix"; url = "github:numtide/treefmt-nix";
@ -55,10 +41,4 @@
}; };
outputs = { ... } @ args: import ./outputs.nix args; outputs = { ... } @ args: import ./outputs.nix args;
nixConfig = {
extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
extra-substituters = "https://nix-community.cachix.org/";
extra-trusted-substituters = "https://nix-community.cachix.org/";
};
} }

View file

@ -108,6 +108,7 @@ with pkgs; [
python38Packages.dateutil python38Packages.dateutil
python38Packages.managesieve python38Packages.managesieve
ranger ranger
recipemd
reptyr reptyr
ripgrep ripgrep
ripgrep ripgrep

View file

@ -8,19 +8,13 @@
, ... , ...
}@inputs: }@inputs:
let let
more-packages = system: {
more-packages = final: prev: {
recipemd = inputs.recipemd.packages.${system}.recipemd;
};
};
nixosSystem = { system ? "x86_64-linux", extraModules ? [ ] }: nixpkgs.lib.nixosSystem { nixosSystem = { system ? "x86_64-linux", extraModules ? [ ] }: nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [{ modules = [{
# Add flakes to registry and nix path. # Add flakes to registry and nix path.
dadada.inputs = inputs // { dadada = self; }; dadada.inputs = inputs // { dadada = self; };
nixpkgs.overlays = nixpkgs.lib.attrValues (self.overlays // (more-packages system)); nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
}] ++ (nixpkgs.lib.attrValues self.nixosModules) ++ [ agenix.nixosModules.age ] ++ extraModules; }] ++ (nixpkgs.lib.attrValues self.nixosModules) ++ [ agenix.nixosModules.age ] ++ extraModules;
}; };
in in
@ -51,7 +45,7 @@ in
]; ];
}; };
surgat = nixosSystem rec { surgat = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
extraModules = [ extraModules = [
{ {

View file

@ -6,7 +6,6 @@
, nixpkgs , nixpkgs
, home-manager , home-manager
, nixos-hardware , nixos-hardware
, recipemd
, agenix , agenix
, devshell , devshell
, ... , ...

View file

@ -9,4 +9,15 @@
}; };
}); });
}; };
recipemd = final: prev: {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(
python-final: python-prev: {
recipemd = python-final.callPackage ./pkgs/recipemd.nix { };
}
)
];
recipemd = prev.python3Packages.toPythonApplication final.python3Packages.recipemd;
};
} }

58
pkgs/recipemd.nix Normal file
View file

@ -0,0 +1,58 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonPackages
, installShellFiles
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "recipemd";
version = "4.0.8";
disabled = pythonOlder "3.7" || pythonAtLeast "4";
src = fetchFromGitHub {
owner = "tstehr";
repo = "RecipeMD";
rev = "v${version}";
hash = "sha256-eumV2zm7TIJcTPRtWSckYz7jiyH3Ek4nIAVtuJs3sJc=";
};
propagatedBuildInputs = with pythonPackages; [
dataclasses-json
yarl
CommonMark
argcomplete
pyparsing
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
${pythonPackages.argcomplete}/bin/register-python-argcomplete -s bash ${pname} > $out/completions.bash
installShellCompletion --bash --name recipemd.bash $out/completions.bash
${pythonPackages.argcomplete}/bin/register-python-argcomplete -s fish ${pname} > $out/completions.fish
installShellCompletion --fish --name recipemd.fish $out/completions.fish
# The version of argcomplete in nixpkgs-stable does not have support for zsh
#${pythonPackages.argcomplete}/bin/register-python-argcomplete -s zsh ${pname} > $out/completions.zsh
#installShellCompletion --zsh --name _recipemd $out/completions.zsh
'';
checkInputs = [
pytestCheckHook
pythonPackages.pytestcov
];
doCheck = true;
meta = with lib; {
description = "Markdown recipe manager, reference implementation of RecipeMD";
homepage = "https://recipemd.org";
license = [ licenses.lgpl3Only ];
maintainers = [ maintainers.dadada ];
};
}