git.delta.rocks / jrsonnet / refs/commits / 914d5f43698e

difftreelog

ci use flake-parts

Yaroslav Bolyukin2024-06-18parent: #18dc4db.patch.diff
in: master

2 files changed

modifiedflake.lockdiffbeforeafterboth
--- a/flake.lock
+++ b/flake.lock
@@ -20,6 +20,26 @@
         "type": "github"
       }
     },
+    "flake-parts": {
+      "inputs": {
+        "nixpkgs-lib": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1717285511,
+        "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "flake-parts",
+        "type": "github"
+      }
+    },
     "flake-utils": {
       "inputs": {
         "systems": "systems"
@@ -56,16 +76,15 @@
     "root": {
       "inputs": {
         "crane": "crane",
-        "flake-utils": "flake-utils",
+        "flake-parts": "flake-parts",
         "nixpkgs": "nixpkgs",
-        "rust-overlay": "rust-overlay"
+        "rust-overlay": "rust-overlay",
+        "shelly": "shelly"
       }
     },
     "rust-overlay": {
       "inputs": {
-        "flake-utils": [
-          "flake-utils"
-        ],
+        "flake-utils": "flake-utils",
         "nixpkgs": [
           "nixpkgs"
         ]
@@ -84,6 +103,29 @@
         "type": "github"
       }
     },
+    "shelly": {
+      "inputs": {
+        "flake-parts": [
+          "flake-parts"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1718420551,
+        "narHash": "sha256-NU8NBXVPj0KuY4Tl/LtZPrbX3PmmmgPuhk/1pzm9cyk=",
+        "owner": "CertainLach",
+        "repo": "shelly",
+        "rev": "4f70221f3f9ad9058f590eefb25251b6760aaa47",
+        "type": "github"
+      },
+      "original": {
+        "owner": "CertainLach",
+        "repo": "shelly",
+        "type": "github"
+      }
+    },
     "systems": {
       "locked": {
         "lastModified": 1681028828,
modifiedflake.nixdiffbeforeafterboth
after · flake.nix
1{2  description = "Jrsonnet";3  inputs = {4    nixpkgs.url = "github:nixos/nixpkgs";5    rust-overlay = {6      url = "github:oxalica/rust-overlay";7      inputs.nixpkgs.follows = "nixpkgs";8    };9    flake-parts = {10      url = "github:hercules-ci/flake-parts";11      inputs.nixpkgs-lib.follows = "nixpkgs";12    };13    crane = {14      url = "github:ipetkov/crane";15      inputs.nixpkgs.follows = "nixpkgs";16    };17    shelly = {18      url = "github:CertainLach/shelly";19      inputs = {20        flake-parts.follows = "flake-parts";21        nixpkgs.follows = "nixpkgs";22      };23    };24  };25  outputs = inputs @ {26    nixpkgs,27    flake-parts,28    rust-overlay,29    crane,30    shelly,31    ...32  }:33    flake-parts.lib.mkFlake {inherit inputs;} {34      imports = [shelly.flakeModule];35      systems = ["x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" "mingw-w64"];36      perSystem = {37        config,38        system,39        ...40      }: let41        pkgs = import nixpkgs {42          inherit system;43          overlays = [rust-overlay.overlays.default];44          config.allowUnsupportedSystem = true;45        };46        rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;47        craneLib = (crane.mkLib pkgs).overrideToolchain rust;48      in {49        legacyPackages = {50          jsonnetImpls = {51            go-jsonnet = pkgs.callPackage ./nix/go-jsonnet.nix {};52            sjsonnet = pkgs.callPackage ./nix/sjsonnet.nix {};53            jsonnet = pkgs.callPackage ./nix/jsonnet.nix {};54            # I didn't managed to build it, and nixpkgs version is marked as broken55            # haskell-jsonnet = pkgs.callPackage ./nix/haskell-jsonnet.nix { };56            rsjsonnet = pkgs.callPackage ./nix/rsjsonnet.nix {};57          };58        };59        packages = rec {60          default = jrsonnet;6162          jrsonnet = pkgs.callPackage ./nix/jrsonnet.nix {63            inherit craneLib;64          };65          jrsonnet-nightly = pkgs.callPackage ./nix/jrsonnet.nix {66            inherit craneLib;67            withNightlyFeatures = true;68          };69          jrsonnet-experimental = pkgs.callPackage ./nix/jrsonnet.nix {70            inherit craneLib;71            withExperimentalFeatures = true;72          };7374          jrsonnet-release = pkgs.callPackage ./nix/jrsonnet-release.nix {75            rustPlatform = pkgs.makeRustPlatform {76              rustc = rust;77              cargo = rust;78            };79          };8081          benchmarks = pkgs.callPackage ./nix/benchmarks.nix {82            inherit (config.legacyPackages.jsonnetImpls) go-jsonnet sjsonnet jsonnet rsjsonnet;83            jrsonnetVariants = [84              {85                drv = jrsonnet.override {forBenchmarks = true;};86                name = "";87              }88            ];89          };90          benchmarks-quick = pkgs.callPackage ./nix/benchmarks.nix {91            inherit (config.legacyPackages.jsonnetImpls) go-jsonnet sjsonnet jsonnet rsjsonnet;92            quick = true;93            jrsonnetVariants = [94              {95                drv = jrsonnet.override {forBenchmarks = true;};96                name = "";97              }98            ];99          };100          benchmarks-against-release = pkgs.callPackage ./nix/benchmarks.nix {101            inherit (config.legacyPackages.jsonnetImpls) go-jsonnet sjsonnet jsonnet rsjsonnet;102            jrsonnetVariants = [103              {104                drv = jrsonnet.override {forBenchmarks = true;};105                name = "current";106              }107              {108                drv = jrsonnet-nightly.override {forBenchmarks = true;};109                name = "current-nightly";110              }111              {112                drv = jrsonnet-release.override {forBenchmarks = true;};113                name = "release";114              }115            ];116          };117          benchmarks-quick-against-release = pkgs.callPackage ./nix/benchmarks.nix {118            inherit (config.legacyPackages.jsonnetImpls) go-jsonnet sjsonnet jsonnet rsjsonnet;119            quick = true;120            jrsonnetVariants = [121              {122                drv = jrsonnet.override {forBenchmarks = true;};123                name = "current";124              }125              {126                drv = jrsonnet-nightly.override {forBenchmarks = true;};127                name = "current-nightly";128              }129              {130                drv = jrsonnet-release.override {forBenchmarks = true;};131                name = "release";132              }133            ];134          };135        };136        shelly.shells.default = {137          factory = craneLib.devShell;138          packages = with pkgs;139            [140              alejandra141              cargo-edit142              cargo-asm143              cargo-outdated144              cargo-watch145              cargo-insta146              lld147              hyperfine148              graphviz149            ]150            ++ lib.optionals (!stdenv.isDarwin) [151              valgrind152              kcachegrind153            ];154        };155      };156    };157}