flake.nix 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.0.1";
  17. src = ./.;
  18. cargoSha256 = "HdlX0U0ikiKLGPLqN8afagrgr37BfaGfEibquZDhvbg=";
  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. ];
  35. };
  36. };
  37. defaultPackage = packages.sync-it;
  38. devShell = packages.devEnvironment;
  39. }
  40. );
  41. }