flake.nix 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. ];
  34. };
  35. };
  36. defaultPackage = packages.sync-it;
  37. devShell = packages.devEnvironment;
  38. }
  39. );
  40. }