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 (system:
  9. let
  10. pkgs = import nixpkgs { inherit system; };
  11. in
  12. rec {
  13. packages = rec {
  14. sync-it = pkgs.rustPlatform.buildRustPackage rec {
  15. name = "sync-it";
  16. version = "0.2.0";
  17. src = ./.;
  18. cargoSha256 = "yLNRBQL4n3ipZCuXGaus1b+YooXw+wfxnm/BQvilhLs=";
  19. meta = with pkgs.stdenv.lib; {
  20. description = "A simple, customizable synchronization tool.";
  21. license = licenses.gpl3Plus;
  22. maintainers = with maintainers; [ swflint ];
  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.rls
  32. pkgs.clippy
  33. pkgs.rustfmt
  34. pkgs.sloc
  35. ];
  36. };
  37. };
  38. defaultPackage = packages.sync-it;
  39. devShell = packages.devEnvironment;
  40. }
  41. );
  42. }