Skip to content

Commit

Permalink
update readme to highlight new flakes (#4)
Browse files Browse the repository at this point in the history
Update the readme to highlight this is built and run using flakes now
rather than the previous devenv way.
  • Loading branch information
fzakaria authored Aug 31, 2023
1 parent 55856f3 commit 8097560
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# sqlelf

![example workflow](https://github.com/fzakaria/sqlelf/actions/workflows/main.yml/badge.svg)
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)

> Explore ELF objects through the power of SQL
A tool that utilizes SQLite's virtual table functionality to allow you to explore Linux ELF objects through SQL.

Expand Down Expand Up @@ -64,17 +67,21 @@ erDiagram
```

## Installation
This repository can easily be installed via source, you simply need to have [Nix or NixOS](https://nixos.org) installed.

Afterwards utilizing [devenv](https://devenv.sh/) you can enter a shell with all the dependencies provided.
This repository can easily be installed, you simply need to have [Nix or NixOS](https://nixos.org) installed.

```console
devenv shell
Building shell ...
Entering shell ...
nix run github:fzakaria/sqlelf /usr/bin/python3 -- \
--sql "select mnemonic, COUNT(*) from elf_instructions GROUP BY mnemonic ORDER BY 2 DESC LIMIT 3"

pip install --editable .
sqlelf --help
mov|223497
call|56209
jmp|48213
```

Note: I publish artifacts to [cachix](https://cachix.org/) that you can use to develop faster.

```console
> cachix use fzakaria
```

## Usage
Expand Down Expand Up @@ -130,4 +137,23 @@ path|num_sections
/bin/ls|31
/usr/bin/pnmarith|27
/usr/bin/ruby|28
```

## Development

You must have [Nix](https://nixos.org) installed for development.

This package uses [poetry2nix](https://github.com/nix-community/poetry2nix) to easily setup a development environment.

```console
nix develop
$ sqlelf --help
usage: sqlelf [-h] [-s SQL] FILE [FILE ...]
```

A helping `Makefile` is provided to run all the _linters_ and _formatters_.

```console
> make lint
> make fmt
```

0 comments on commit 8097560

Please sign in to comment.