@@ 0,0 1,59 @@
+{
+ "nodes": {
+ "crate2nix": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1678256065,
+ "narHash": "sha256-gZK7UPeL5276Zbjamo8zWDPDxYi6S81sumCKeZr69Vo=",
+ "owner": "kolloch",
+ "repo": "crate2nix",
+ "rev": "a00ef13cd769496bf937b16f16acad01fd004e1f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "kolloch",
+ "repo": "crate2nix",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1676283394,
+ "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1678306555,
+ "narHash": "sha256-3C/ivszxgGeItTKkU2Mcn9LrBKLpO3BK0LUPPXKUJtw=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "3d57138bd9abe31bae25704cebaab7527010cc5e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "crate2nix": "crate2nix",
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
@@ 0,0 1,45 @@
+# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
+#
+# SPDX-License-Identifier: CC0-1.0
+
+{
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs";
+ crate2nix = {
+ url = "github:kolloch/crate2nix";
+ flake = false;
+ };
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, crate2nix, flake-utils }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+
+ crateName = "kitty-img";
+
+ inherit (import "${crate2nix}/tools.nix" { inherit pkgs; })
+ generatedCargoNix;
+
+ project = import (generatedCargoNix {
+ name = crateName;
+ src = ./.;
+ }) {
+ inherit pkgs;
+ defaultCrateOverrides = pkgs.defaultCrateOverrides // {
+ # Crate dependency overrides go here
+ };
+ };
+
+ in {
+ packages.${crateName} = project.rootCrate.build;
+
+ defaultPackage = self.packages.${system}.${crateName};
+
+ devShell = pkgs.mkShell {
+ inputsFrom = builtins.attrValues self.packages.${system};
+ buildInputs = [ pkgs.cargo pkgs.rust-analyzer pkgs.clippy ];
+ };
+ });
+}