aboutsummaryrefslogtreecommitdiffstats
path: root/sys/nixpkgs/pkgs/generate_moz_extension/flake.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-03-23 14:59:36 +0100
committerSoispha <soispha@vhack.eu>2024-03-23 14:59:36 +0100
commit8816ccb0b24c40086d9caebccb97ea8d73102630 (patch)
treeee3e08e1ad1244eb1468b238fa2d69cd8a5d643a /sys/nixpkgs/pkgs/generate_moz_extension/flake.nix
parentfix(pkgs/scripts/update-sys): Add new `systemd-run` dependency (diff)
downloadnixos-config-8816ccb0b24c40086d9caebccb97ea8d73102630.zip
feat(pkgs/generate_moz_extensions): Vendor it
This project was hosted as a separate git repository. It is now vendored, like the other projects directly associated with the configuration.
Diffstat (limited to '')
-rw-r--r--sys/nixpkgs/pkgs/generate_moz_extension/flake.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/sys/nixpkgs/pkgs/generate_moz_extension/flake.nix b/sys/nixpkgs/pkgs/generate_moz_extension/flake.nix
new file mode 100644
index 00000000..5575f90b
--- /dev/null
+++ b/sys/nixpkgs/pkgs/generate_moz_extension/flake.nix
@@ -0,0 +1,75 @@
+{
+ description = "A simple way to query the mozialla api for extension data";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+
+ crane = {
+ url = "github:ipetkov/crane";
+ inputs = {
+ nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ flake-utils.url = "github:numtide/flake-utils";
+
+ rust-overlay = {
+ url = "github:oxalica/rust-overlay";
+ inputs = {
+ nixpkgs.follows = "nixpkgs";
+ flake-utils.follows = "flake-utils";
+ };
+ };
+ };
+
+ outputs = {
+ self,
+ nixpkgs,
+ crane,
+ flake-utils,
+ rust-overlay,
+ ...
+ }:
+ flake-utils.lib.eachDefaultSystem (system: let
+ pkgs = import nixpkgs {
+ inherit system;
+ overlays = [(import rust-overlay)];
+ };
+
+ rust-stable = pkgs.rust-bin.stable.latest.default;
+ rust-minimal = pkgs.rust-bin.stable.latest.minimal;
+
+ craneLib = (crane.mkLib pkgs).overrideToolchain rust-minimal;
+
+ buildInputs = [
+ pkgs.openssl # needed for openssl
+ ];
+ nativeBuildInputs = [
+ pkgs.pkg-config # needed for openssl
+ ];
+
+ craneBuild = craneLib.buildPackage {
+ src = craneLib.cleanCargoSource ./.;
+ inherit buildInputs nativeBuildInputs;
+
+ doCheck = true;
+ };
+ in {
+ packages.default = craneBuild;
+ app.default = {
+ type = "app";
+ program = "${self.packages.${system}.default}/bin/generate_extensions";
+ };
+ devShells.default = pkgs.mkShell {
+ packages = with pkgs; [
+ cocogitto
+
+ rust-stable
+ cargo-edit
+ ];
+ inherit buildInputs nativeBuildInputs;
+ };
+ });
+}
+# vim: ts=2
+