flake.nix 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. description = "A custom synchronization tool";
  3. inputs = {
  4. nixpkgs.url = "github:NixOS/nixpkgs";
  5. utils.url = "github:numtide/flake-utils";
  6. };
  7. outputs = { self, nixpkgs, utils }:
  8. utils.lib.eachDefaultSystem (
  9. system:
  10. let
  11. pkgs = import nixpkgs { inherit system; };
  12. in
  13. rec {
  14. packages = rec {
  15. sync-it = pkgs.rustPlatform.buildRustPackage rec {
  16. name = "sync-it";
  17. version = "2.1.2";
  18. src = ./.;
  19. cargoSha256 = "sha256-QaczpiWSZoJg4BZbirz/+w2tfe9Or+jCBY3Adt70+y8=";
  20. meta = {
  21. description = "A simple, customizable synchronization tool.";
  22. license = "GPL-3.0-or-later";
  23. };
  24. };
  25. devEnvironment = pkgs.mkShell {
  26. name = "sync-it-dev-environment";
  27. buildInputs = [
  28. pkgs.pre-commit
  29. pkgs.rustc
  30. pkgs.cargo
  31. pkgs.rust-analyzer
  32. pkgs.clippy
  33. pkgs.rustfmt
  34. pkgs.sloc
  35. ];
  36. };
  37. };
  38. defaultPackage = packages.sync-it;
  39. devShell = packages.devEnvironment;
  40. }
  41. );
  42. }